summaryrefslogtreecommitdiff
path: root/sysconf/65-vyatta-net.rules
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-10-26 14:48:22 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-10-26 14:48:22 -0700
commit40461ef6ea9325b0dd1262cd3b99ffcbcf69dfd6 (patch)
treef1ef54222a2296bbed7103a2db1e44529e95d3a9 /sysconf/65-vyatta-net.rules
parent7dc4ac0cb122bc98f903f93fc83e93007de7c751 (diff)
parent3e0d01a69b7f70977375ab73a51cfc5004813065 (diff)
downloadvyatta-cfg-system-40461ef6ea9325b0dd1262cd3b99ffcbcf69dfd6.tar.gz
vyatta-cfg-system-40461ef6ea9325b0dd1262cd3b99ffcbcf69dfd6.zip
Merge branch 'mendocino' of http://git.vyatta.com/vyatta-cfg-system into mendocino
Diffstat (limited to 'sysconf/65-vyatta-net.rules')
-rw-r--r--sysconf/65-vyatta-net.rules13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysconf/65-vyatta-net.rules b/sysconf/65-vyatta-net.rules
new file mode 100644
index 00000000..1372110f
--- /dev/null
+++ b/sysconf/65-vyatta-net.rules
@@ -0,0 +1,13 @@
+# These rules use vyatta_net_name to persistently name network interfaces
+# per "hwid" association in the Vyatta configuration file.
+
+ACTION!="add", GOTO="vyatta_net_end"
+SUBSYSTEM!="net", GOTO="vyatta_net_end"
+
+# ignore the interface if a name has already been set
+NAME=="?*", GOTO="vyatta_net_end"
+
+# Do name change for ethernet and wireless devices only
+KERNEL=="eth*|wlan*", PROGRAM="vyatta_net_name %k $attr{address}", NAME="%c"
+
+LABEL="vyatta_net_end"