70-persistent-net.rules not created

linux fan linuxscratch at gmail.com
Tue Jan 12 08:59:45 PST 2010


On 1/12/10, jmscott at setex.ipcallback.com <jmscott at setex.ipcallback.com> wrote:

> not clear that adding --subsystem would force INTERFACE to be exported to

Hmm,

Output of ls -d /sys/class/net/*
/sys/class/net/eth0  /sys/class/net/lo

Output of ls -dl /sys/class/net/*
lrwxrwxrwx 1 root root 0 2010-01-12 03:44 /sys/class/net/eth0 ->
../../devices/pci0000:00/0000:00:09.0/net/eth0
lrwxrwxrwx 1 root root 0 2010-01-12 03:44 /sys/class/net/lo ->
../../devices/virtual/net/lo

I made a quick script and named it fubar:
for NIC in /sys/class/net/* ; do
    echo "INTERFACE=${NIC##*/} udevadm test --action=add $NIC"
done

Here is the output of 'sh fubar'
INTERFACE=eth0 udevadm test --action=add /sys/class/net/eth0
INTERFACE=lo udevadm test --action=add /sys/class/net/lo

I remove the rule in my /etc/udev/rules.d/70-persistent-net.rules
pertaining to eth0 (the only rule in the file).

I execute the command line:
INTERFACE=eth0 udevadm test --action=add /sys/class/net/eth0

And I get the exact same rule put back in and I did see this output
which is consistent with the ls -dl
import_uevent_var: import into environment: 'INTERFACE=eth0'
import_uevent_var: import into environment: 'IFINDEX=2'
udevadm_test: looking at device
'/devices/pci0000:00/0000:00:09.0/net/eth0' from subsystem 'net'

Just experimenting ...



More information about the lfs-support mailing list