summaryrefslogtreecommitdiff
path: root/etc/udev/debian/persistent-net-generator.rules
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2007-08-07 10:41:42 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-08-07 10:41:42 +0200
commit7134ab1b332250e03b58da9f39e1823f2ae6c172 (patch)
tree25ac4d7ce83996653ecba02df8dcc72ce59ea517 /etc/udev/debian/persistent-net-generator.rules
parent0837c28e9b3bc1fc42ed0d4212abdddd3277e1fa (diff)
rules: Debian update
Diffstat (limited to 'etc/udev/debian/persistent-net-generator.rules')
-rw-r--r--etc/udev/debian/persistent-net-generator.rules48
1 files changed, 48 insertions, 0 deletions
diff --git a/etc/udev/debian/persistent-net-generator.rules b/etc/udev/debian/persistent-net-generator.rules
new file mode 100644
index 0000000000..6df00bff2f
--- /dev/null
+++ b/etc/udev/debian/persistent-net-generator.rules
@@ -0,0 +1,48 @@
+# These rules generate rules to keep network interface names unchanged
+# across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules.
+#
+# The default name for this file is z45_persistent-net-generator.rules.
+
+ACTION!="add", GOTO="persistent_net_generator_end"
+SUBSYSTEM!="net", GOTO="persistent_net_generator_end"
+
+# ignore the interface if a name has already been set
+NAME=="?*", GOTO="persistent_net_generator_end"
+
+# ignore Xen virtual interfaces
+SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end"
+
+# ignore UML virtual interfaces
+DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end"
+
+# ignore VMWare virtual interfaces
+ATTR{address}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end"
+
+# ignore interfaces with random MAC addresses
+ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end"
+
+# ignore "secondary" raw interfaces of the madwifi driver
+KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end"
+
+# provide nice comments for the generated rules
+SUBSYSTEMS=="pci", \
+ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}"
+SUBSYSTEMS=="usb", \
+ ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}"
+SUBSYSTEMS=="ccwgroup", \
+ ENV{COMMENT}="S/390 device at $id",
+SUBSYSTEMS=="ieee1394", \
+ ENV{COMMENT}="Firewire device $attr{host_id}"
+ENV{COMMENT}=="", \
+ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})"
+ATTRS{driver}=="?*", \
+ ENV{COMMENT}="$env{COMMENT} ($attr{driver})"
+
+# ignore interfaces without a driver link like bridges and VLANs
+KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", DRIVERS=="?*",\
+ IMPORT{program}="write_net_rules $attr{address}"
+
+ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
+
+LABEL="persistent_net_generator_end"
+