1# these rules generate rules for persistent network device naming
2
3ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*|ath*|wlan*|ra*|sta*" \
4	NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do"
5
6GOTO="persistent_net_generator_end"
7LABEL="persistent_net_generator_do"
8
9# build device description string to add a comment the generated rule
10SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($attr{driver})"
11SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($attr{driver})"
12SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
13SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device"
14ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($attr{driver})"
15
16IMPORT{program}="write_net_rules $attr{address}"
17ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
18
19LABEL="persistent_net_generator_end"
20