diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-10-07 13:16:57 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-10-07 13:52:31 -0700 |
commit | cbc9578ade6afaf6db039401182b6cfe14e73ff9 (patch) | |
tree | 1fd7676d24f778d3e98180b4285b24e943cca4d3 /sysconf/69-vyatta-net.rules | |
parent | 766bb0ca075060a8ebafbc57f499933f48aabdbe (diff) | |
download | vyatta-cfg-system-cbc9578ade6afaf6db039401182b6cfe14e73ff9.tar.gz vyatta-cfg-system-cbc9578ade6afaf6db039401182b6cfe14e73ff9.zip |
Put udev rules in /lib/udev
Udev rules have moved from /etc/udev to /lib/udev on Debian Squeeze
Diffstat (limited to 'sysconf/69-vyatta-net.rules')
-rw-r--r-- | sysconf/69-vyatta-net.rules | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sysconf/69-vyatta-net.rules b/sysconf/69-vyatta-net.rules new file mode 100644 index 00000000..9e874381 --- /dev/null +++ b/sysconf/69-vyatta-net.rules @@ -0,0 +1,25 @@ +# These rules use vyatta_net_name to persistently name network interfaces +# per "hwid" association with the interface block of the vyatta config file. + +# note that this is actually invoked twice: once during early rcS (udev) +# and the second time during rl-system (rescan). pre-mendocino, ACTION is +# "add" on both invocations, so the original rule looks for "add". +# +# however, in mendocino, the squeeze udev performs the second invocation with +# ACTION "change", so the original rule does not get applied on the second +# invocation, and therefore config.boot is not updated by rl-system. +# +# to emulate the previous behavior, invoke vyatta_net_name for both "add" and +# "change" for now. however, the two-pass approach should be revisited to +# determine if it is still necessary. + +ACTION!="add", ACTION!="change", 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 devices only +KERNEL=="eth*", PROGRAM="vyatta_net_name %k $attr{address}", NAME="%c" + +LABEL="vyatta_net_end" |