summaryrefslogtreecommitdiff
path: root/biosdevname.rules.in
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2012-03-02 16:46:39 -0800
committerStephen Hemminger <shemminger@vyatta.com>2012-03-03 09:56:10 -0800
commit6f0d227c17e898f5c1a0e015bd3275f56ae23a19 (patch)
tree9f40b2f18710e1fee144cc9cff686e18fe6a47cb /biosdevname.rules.in
parentd86431f9a431288b3b9d0bed26303a13cc1875b5 (diff)
downloadvyatta-biosdevname-6f0d227c17e898f5c1a0e015bd3275f56ae23a19.tar.gz
vyatta-biosdevname-6f0d227c17e898f5c1a0e015bd3275f56ae23a19.zip
Update to biosdevname 0.3.11
Manual merge from http://linux.dell.com/biosdevname/biosdevname-0.3.11/ (cherry picked from commit 79066f1bdcb77fa8cfca2d98464257e1e436b58d)
Diffstat (limited to 'biosdevname.rules.in')
-rw-r--r--biosdevname.rules.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/biosdevname.rules.in b/biosdevname.rules.in
index a3be69c..6379164 100644
--- a/biosdevname.rules.in
+++ b/biosdevname.rules.in
@@ -1,6 +1,20 @@
SUBSYSTEM!="net", GOTO="netdevicename_end"
KERNEL!="eth*", GOTO="netdevicename_end"
ACTION!="add", GOTO="netdevicename_end"
+NAME=="?*", GOTO="netdevicename_end"
+
+# kernel command line "biosdevname={0|1}" can turn off/on biosdevname
+IMPORT{cmdline}="biosdevname"
+ENV{biosdevname}=="?*", ENV{UDEV_BIOSDEVNAME}="$env{biosdevname}"
+# ENV{UDEV_BIOSDEVNAME} can be used for blacklist/whitelist
+# but will be overwritten by the kernel command line argument
+ENV{UDEV_BIOSDEVNAME}=="0", GOTO="netdevicename_end"
+ENV{UDEV_BIOSDEVNAME}=="1", GOTO="netdevicename_start"
+
+# uncomment the next line for biosdevname to be off by default
+# GOTO="netdevicename_end"
+
+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.