~ubuntu-branches/ubuntu/saucy/biosdevname/saucy-proposed

« back to all changes in this revision

Viewing changes to biosdevname.rules.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-02-23 17:58:36 UTC
  • Revision ID: james.westby@ubuntu.com-20110223175836-4f0cbcno9zm0lmdu
Tags: upstream-0.3.7
ImportĀ upstreamĀ versionĀ 0.3.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SUBSYSTEM!="net", GOTO="netdevicename_end"
 
2
KERNEL!="eth*",   GOTO="netdevicename_end"
 
3
ACTION!="add",    GOTO="netdevicename_end"
 
4
NAME=="?*",       GOTO="netdevicename_end"
 
5
 
 
6
# kernel command line "biosdevname={0|1}" can turn off/on biosdevname
 
7
IMPORT{cmdline}="biosdevname"
 
8
ENV{biosdevname}=="?*", ENV{UDEV_BIOSDEVNAME}="$env{biosdevname}"
 
9
# ENV{UDEV_BIOSDEVNAME} can be used for blacklist/whitelist
 
10
# but will be overwritten by the kernel command line argument
 
11
ENV{UDEV_BIOSDEVNAME}=="0", GOTO="netdevicename_end"
 
12
ENV{UDEV_BIOSDEVNAME}=="1", GOTO="netdevicename_start"
 
13
 
 
14
# uncomment the next line for biosdevname to be off by default
 
15
# GOTO="netdevicename_end"
 
16
 
 
17
LABEL="netdevicename_start"
 
18
 
 
19
# using NAME= instead of setting INTERFACE_NAME, so that persistent
 
20
# names aren't generated for these devices, they are "named" on each boot.
 
21
PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c",  OPTIONS+="string_escape=replace"
 
22
 
 
23
LABEL="netdevicename_end"