Magellan Linux

Contents of /trunk/udev/udev-persistent-net-generator.rules.magellan

Parent Directory Parent Directory | Revision Log Revision Log


Revision 294 - (show annotations) (download)
Fri Aug 17 20:08:47 2007 UTC (16 years, 8 months ago) by niro
File size: 1661 byte(s)
-upstream fixes

1 # /etc/udev/rules/75-persistent-net-generator.rules: device naming rules for udev
2 # $Header: /root/magellan-cvs/src/udev/udev-persistent-net-generator.rules.magellan,v 1.2 2007-08-17 20:08:47 niro Exp $
3
4 # these rules generate rules for persistent network device naming
5
6 ACTION!="add", GOTO="persistent_net_generator_end"
7 SUBSYSTEM!="net", GOTO="persistent_net_generator_end"
8
9 # device name whitelist
10 KERNEL!="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end"
11
12 # build device description string to add a comment the generated rule
13 # 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 SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
24 ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)"
25
26 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 ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
33
34 LABEL="persistent_net_generator_end"
35