biosdevname/biosdevname-0.5.0-rules.patch
Harald Hoyer 378eb30853 biosdevname-0.5.0-2
- not only NAME KERNEL=="eth*", but every ethernet device
2013-09-02 19:16:32 +02:00

22 lines
1.1 KiB
Diff

diff -up biosdevname-0.5.0/biosdevname.rules.in.new biosdevname-0.5.0/biosdevname.rules.in
--- biosdevname-0.5.0/biosdevname.rules.in.new 2013-03-12 13:26:06.000000000 +0100
+++ biosdevname-0.5.0/biosdevname.rules.in 2013-09-02 19:07:01.953956219 +0200
@@ -1,7 +1,8 @@
SUBSYSTEM!="net", GOTO="netdevicename_end"
-KERNEL!="eth*", GOTO="netdevicename_end"
ACTION!="add", GOTO="netdevicename_end"
NAME=="?*", GOTO="netdevicename_end"
+ATTR{type}!="1", GOTO="netdevicename_end"
+ENV{DEVTYPE}=="?*", GOTO="netdevicename_end"
# kernel command line "biosdevname={0|1}" can turn off/on biosdevname
IMPORT{cmdline}="biosdevname"
@@ -18,6 +19,6 @@ LABEL="netdevicename_start"
# using NAME= instead of setting INTERFACE_NAME, so that persistent
# names aren't generated for these devices, they are "named" on each boot.
-PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
+SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
LABEL="netdevicename_end"