chiark / gitweb /
add persistent rules generator for net devices and optical drives
[elogind.git] / extras / rule_generator / 75-persistent-net-generator.rules
1 # these rules generate rules for persistent network device naming
2
3 ACTION=="add", SUBSYSTEM=="net", NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do"
4 GOTO="persistent_net_generator_end"
5
6 LABEL="persistent_net_generator_do"
7 # export device description to comment the generated rule
8 SUBSYSTEMS=="pci", ENV{COMMENT}="PCI Device: $attr{vendor}:$attr{device} ($attr{driver})"
9 SUBSYSTEMS=="usb", ENV{COMMENT}="USB Device: 0x$attr{idVendor}:0x$attr{idProduct} ($attr{driver})"
10 SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire Device: $attr{host_id} ($attr{driver})"
11 SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device"
12
13 KERNEL=="eth*|ath*|wlan*|ra*|sta*", IMPORT{program}="write_net_rules $attr{address}"
14 ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
15
16 LABEL="persistent_net_generator_end"
17