From 4a92157b9e077514fdbf5845169323ed7370bedb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 21 Oct 2010 16:57:16 -0700 Subject: Change vyatta_net_name into a perl script Use existing config parser and perl to handle udev device naming. Do renaming early in udev boot, and fixup config file later. This avoids rescanning udev devices on boot and adds preliminary support for hotplug. --- sysconf/65-vyatta-net.rules | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sysconf/65-vyatta-net.rules (limited to 'sysconf/65-vyatta-net.rules') 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" -- cgit v1.2.3