Udev rule oddity

Bruce Dubbs bruce.dubbs at gmail.com
Tue Jan 26 15:03:52 PST 2010


Matthew Burgess wrote:
> Hi,
> 
> I wasn't sure whether to report this as a bug in LFS or Udev or whether 
> it's just my misunderstanding.  If I remove 
> /etc/udev/rules.d/70-persistent* (simulating how things look on a first 
> boot into a freshly-built system) I then get the following on a reboot:
> 
> udevd[371]: can not read '/etc/udev/rules.d/70-persistent-cd.rules'
> udevd[371]: can not read '/etc/udev/rules.d/70-persistent-net.rules'
> 
> By the time I've logged in, those files do exist because they were 
> created by write_cd_rules and write_net_rules respectively, in turn by 
> 75-cd-aliases-generator.rules and 75-persistent-net-generator.rules.
> 
> So the question is, why does Udev try to read files that don't exist 
> yet? How does it even know that they will/should exist?  This looks to 
> me to be some kind of race condition but I'm not overly sure!

I believe that 70-persistent-net.rules is created in Section 7.13

for NIC in /sys/class/net/* ; do
     INTERFACE=${NIC##*/} udevadm test --action=add $NIC
done

and a discussion of /etc/udev/rules.d/70-persistent-cd.rules is in 
section 7.10.

The newer udev package may have changed what we need to do.

   -- Bruce






More information about the lfs-dev mailing list