From 766bb0ca075060a8ebafbc57f499933f48aabdbe Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 7 Oct 2010 13:14:48 -0700 Subject: Change udev network naming to be more cooperative Other udev scripts may have configured the device name before the Vyatta script runs. Use the convention followed by the standard persistent network name script; only applly name rules if interface does not already have name assigned. --- sysconf/vyatta-net.rules | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sysconf') diff --git a/sysconf/vyatta-net.rules b/sysconf/vyatta-net.rules index f01c3d3c..9e874381 100644 --- a/sysconf/vyatta-net.rules +++ b/sysconf/vyatta-net.rules @@ -16,11 +16,10 @@ ACTION!="add", ACTION!="change", GOTO="vyatta_net_end" SUBSYSTEM!="net", GOTO="vyatta_net_end" -# Do name change for ethernet devices only. -# note that the original rule was checking "DRIVERS", which does not appear -# to be available (empty string) from the squeeze udev. skip the DRIVERS -# check for now. +# 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" - -- cgit v1.2.3