On Wed, Jan 19, 2011 at 11:03 PM, John Lumby <johnlumby@xxxxxxxxxxx> wrote: >> Rules in /etc over-rule rules in /lib with the same name. >> >> echo "# disable net-generator rules in /lib/udev" > \ >> /etc/udev/rules.d/75-persistent-net-generator.rules >> > That looks perfect - except ... I already have a /etc/udev/rules.d/75-persistent-net-generator.rules > and at the top it says: > # do not edit this file, it will be overwritten on update > > Is that true? If so - although I can see this would work, I'm no better off than editing the /lib/udev/write_net_rules am I? > Either you have really old udev version or your distribution installs standard rules under /etc instead of under /lib. In both cases you probably need to ask your distro about it. > Andrey Borzenkov wrote: >> >> /lib/udev/rules.d/75-persistent-net-generator.rules should not call >> write_net_rules if NAME is already set, so >> >> KERNEL=="eth0", NAME="eth0" >> > > I think I see how this would prevent the renaming but how can I achieve the renaming I *do* want? > It seems to me that adding KERNEL=="eth0", NAME="eth0" would prevent udev from doing anything when > KERNEL!="eth0", wouldn't it? No, it won't. > I didn't try it but that's my reading of the man page - > there is no syntax for parenthesising conditions e.g. > > ( KERNEL=="eth0", NAME="eth0" ) || ( KERNEL!="eth0", NAME="eth1" ) > is there? > Just continue to use the same rules for KERNEL != "eth0" as you use now. > I have one more question - is there any master user-specified profile or config file associated with udev? > Something which orchestrates all the other parts? Current udev reads /etc/udev/rules.d, /lib/udev/rules.d and one more directory under /dev for rules generated when root was still read-only. This is hardcoded. -- 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