2006-09-05 17:20:28 +04:00
# these rules generate rules for persistent network device naming
2007-07-25 17:42:39 +04:00
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*" \
2006-09-09 16:45:45 +04:00
NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do"
2006-09-05 17:20:28 +04:00
2006-09-09 16:45:45 +04:00
GOTO="persistent_net_generator_end"
2006-09-05 17:20:28 +04:00
LABEL="persistent_net_generator_do"
2006-09-09 16:45:45 +04:00
# build device description string to add a comment the generated rule
2007-07-25 17:42:39 +04:00
SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)"
SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)"
2007-07-25 20:16:11 +04:00
SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)"
2007-07-25 17:42:39 +04:00
SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver"
2006-09-09 16:45:45 +04:00
SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
2006-09-05 17:20:28 +04:00
SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device"
2007-07-25 17:42:39 +04:00
ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)"
2006-09-05 17:20:28 +04:00
2007-07-25 17:42:39 +04:00
ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env{NETDRV} --id $env{NETDEV}"
ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}"
2006-09-05 17:20:28 +04:00
ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
LABEL="persistent_net_generator_end"