LWN.net Logo

Char devices for network interfaces

Char devices for network interfaces

Posted Oct 15, 2009 17:46 UTC (Thu) by dlang (✭ supporter ✭, #313)
In reply to: Char devices for network interfaces by nix
Parent article: Char devices for network interfaces

yes, and I did that for a while, but then an update to udev added it back in.


(Log in to post comments)

Char devices for network interfaces

Posted Oct 15, 2009 18:54 UTC (Thu) by nix (subscriber, #2304) [Link]

This of course is the downside of having this sort of thing in a set
of 'standard rules': it's hard to eliminate them without hacking udev
before installation :/

Char devices for network interfaces

Posted Oct 15, 2009 19:07 UTC (Thu) by joey (subscriber, #328) [Link]

Removing rules files would work fine if a) using dpkg and b) udev had left
its rules files as conffiles under /etc. This sort of situation is why dpkg
does not add back deleted conffiles on upgrade. But since udev's rules files
have moved to /lib/udev, deletion of rules files will no longer persist
across upgrades.

Now it seems you'd have to create an empty version of the net generator rule
in /etc/udev to override the one from /lib/udev.

Rather a mess.

Char devices for network interfaces

Posted Oct 15, 2009 20:09 UTC (Thu) by nix (subscriber, #2304) [Link]

That was exactly my moan :)

I'm not sure that creating an empty version of the net generator rule file
works, either: I'm not sure if udev replaces files named $FOO in /lib/udev
with files of the same name in /etc/udev/rules.d. NEWS says:

> It does not matter in which directory a rule file lives, all files are
> sorted in lexical order.

which could go either way.

Char devices for network interfaces

Posted Oct 16, 2009 3:02 UTC (Fri) by njs (guest, #40338) [Link]

dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules --divert /lib/udev/die-die-die --rename ?

The use of /lib here does seem bizarre though.

Char devices for network interfaces

Posted Oct 16, 2009 16:15 UTC (Fri) by nix (subscriber, #2304) [Link]

Well, /lib/udev was already in use for other udev stuff which has to be runnable before /usr is mounted (e.g. /lib/udev/vol_id).

But, yes, putting what damn well should be conffiles (as witness the fact that people want to change them, even if udev upstream is resistant) in /lib is demented.

Char devices for network interfaces

Posted Oct 22, 2009 18:18 UTC (Thu) by jengelh (subscriber, #33263) [Link]

You are supposed to truncate the file, not remove it. It's the only way the SHA check will work as intended, presuming that the udev files are also marked as %config(noreplace) in rpm.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds