Annotation of /tags/udev-114-r3/udev/udev-persistent-net-generator.rules.magellan
Parent Directory | Revision Log
Revision 299 -
(hide annotations)
(download)
Fri Aug 17 20:34:57 2007 UTC (17 years, 1 month ago) by (unknown author)
File size: 1661 byte(s)
Fri Aug 17 20:34:57 2007 UTC (17 years, 1 month ago) by (unknown author)
File size: 1661 byte(s)
This commit was manufactured by cvs2svn to create tag 'udev-114-r3'.
1 | niro | 121 | # /etc/udev/rules/75-persistent-net-generator.rules: device naming rules for udev |
2 | niro | 294 | # $Header: /root/magellan-cvs/src/udev/udev-persistent-net-generator.rules.magellan,v 1.2 2007-08-17 20:08:47 niro Exp $ |
3 | niro | 121 | |
4 | # these rules generate rules for persistent network device naming | ||
5 | |||
6 | niro | 294 | ACTION!="add", GOTO="persistent_net_generator_end" |
7 | SUBSYSTEM!="net", GOTO="persistent_net_generator_end" | ||
8 | niro | 121 | |
9 | niro | 294 | # device name whitelist |
10 | KERNEL!="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" | ||
11 | niro | 121 | |
12 | # build device description string to add a comment the generated rule | ||
13 | niro | 294 | # ignore the interface if a name has already been set |
14 | NAME=="?*", GOTO="persistent_net_generator_end" | ||
15 | |||
16 | # ignore Xen virtual interfaces | ||
17 | SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" | ||
18 | |||
19 | SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" | ||
20 | SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" | ||
21 | SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" | ||
22 | SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver" | ||
23 | niro | 121 | SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" |
24 | niro | 294 | ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)" |
25 | niro | 121 | |
26 | niro | 294 | DRIVERS!="?*", ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env{NETDRV} --id $env{NETDEV}" |
27 | |||
28 | # skip "locally administered" MAC addresses | ||
29 | ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" | ||
30 | |||
31 | DRIVERS!="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" | ||
32 | niro | 121 | ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" |
33 | |||
34 | LABEL="persistent_net_generator_end" | ||
35 |