Re: default udev rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-08-11 at 14:03 +0100, Scott James Remnant wrote:
> I've yet to have it explained to me why udev rules suddenly aren't
> configuration files.  They've been configuration files for years, 

False. The rules have lived in /etc though so many many people and
distros mistakenly assume they can be edited and that they are
configuration files. It's a common misconception. 

FWIW, if you edit some udev rules then your system will most likely
break in one way or another. Look at it this way, what do you think
would happen if a user changed any of these rules

  "KERNEL=="device-mapper", NAME="mapper/control"

  RUN+="socket:/org/freedesktop/hal/udev_event"

Thanks for playing.

Of course, one mans configuration file is another mans system
implementation detail. Me? I see the new policy of shipping the default
rules in /lib just as a reinforcement of the fact that (most) udev rules
are not to be edited by users nor admins. Of course the world isn't as
black as white as you paint it hence why udev will still read files
from /etc/udev/rules.d so hackers, ppl building embedded systems and
hobbyist users can override rules there.

In fact, we should put 

 # DO NOT EDIT. This is not a configuration file, see the udev man page for details

in the top of each udev rule. Then said man page can tell the user what
to do. Kay?

> and we
> encourage people to edit them.

Very bad advice. Please stop doing that. If you encourage people to edit
these files then lots of "useful" HOWTO's and user forums will tell
newbies to edit them to "fix" their system (instead of getting the OS
vendor to fix it properly). Then said users will end up editing a file
with vital udev rules and then end up with either a) .rpmnew/.rpmorig
files (and a broken system); or b) they get exposed to crappy dialogs
like

http://weblogs.mozillazine.org/gerv/archives/2008/04/upgrading_to_hardy.html

depending on how the distro deals with configuration file changes.
IMNSHO, both are bad approaches in their own way. 

The solution is to stop offering configuration knobs. Especially when
none are needed. The move of rules to /lib from /etc is just, again, a
reinforcement of that view from upstream.

FWIW, it's off-putting to hear blanket statements like "my rules are so
much better" and "it's been like that for year" etc. ; that's _not_ how
to deal with upstream. Send patches. Thanks.

      David


--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux