[Gllug] NICs on RHEL 4.0

Yashpal Nagar yash at linux-delhi.org
Mon Nov 13 17:19:19 UTC 2006


Nix wrote:
>
>
> These days, thank god, you can forget all that crap and use udev's
> network-interface renaming to rename the damn things based on attributes
> plucked from sysfs.
>
>   
Finally trying to write udev rules based upon mac address:
#udevinfo -a -p /class/net/eth0
looking at class device '/sys/class/net/eth0':
    SYSFS{addr_len}="6"
    SYSFS{address}="00:0b:cd:4e:31:c1"
    SYSFS{broadcast}="ff:ff:ff:ff:ff:ff"
    SYSFS{features}="0x11a3"
    SYSFS{flags}="0x1003"
    SYSFS{ifindex}="2"
    SYSFS{iflink}="2"
    SYSFS{mtu}="1500"
    SYSFS{tx_queue_len}="1000"
    SYSFS{type}="1"
follow the class device's "device"
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:05.0':
    BUS="pci"
    ID="0000:00:05.0"
    SYSFS{class}="0x020000"
    SYSFS{detach_state}="0"
    SYSFS{device}="0x16a6"
    SYSFS{irq}="177"
    SYSFS{subsystem_device}="0x00bb"
    SYSFS{subsystem_vendor}="0x0e11"
    SYSFS{vendor}="0x14e4"
  looking at the device chain at '/sys/devices/pci0000:00':
    BUS=""
    ID="pci0000:00"
    SYSFS{detach_state}="0"

Based upon above i made two rule and put them in 
/etc/udev/rules.d/10-local.rules
#SYSFS{address}=="00:0b:cd:4e:31:c1", NAME="eth0"
#SYSFS{address}=="00:0b:cd:4e:2e:f7", NAME="eth1"
BUS=="pci", SYSFS{irq}=="177", NAME="eth0"
BUS=="pci", SYSFS{irq}=="185", NAME="eth1"

Both sets above fails stating  the above in logs
Nov 13 17:16:06 Servername udev[7497]: parse error 
/etc/udev/rules.d/10-local.rules, line 3:0, rule skipped
Nov 13 17:16:06 Servername  udev[7497]: parse error 
/etc/udev/rules.d/10-local.rules, line 4:0, rule skipped

does anyone have any clue?

Regards
Yashpal







-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list