summaryrefslogtreecommitdiff
path: root/sysconf/65-vyatta-net.rules
diff options
context:
space:
mode:
Diffstat (limited to 'sysconf/65-vyatta-net.rules')
-rw-r--r--sysconf/65-vyatta-net.rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysconf/65-vyatta-net.rules b/sysconf/65-vyatta-net.rules
index 0f4b9006..2b48c121 100644
--- a/sysconf/65-vyatta-net.rules
+++ b/sysconf/65-vyatta-net.rules
@@ -13,6 +13,13 @@ KERNEL!="eth*|wlan*", GOTO="vyatta_net_end"
# ignore "secondary" monitor interfaces of mac80211 drivers
KERNEL=="wlan*", ATTRS{type}=="803", GOTO="vyatta_net_end"
+# If using VyOS predefined names
+ENV{VYOS_IFNAME}!="eth*", GOTO="end_vyos_predef_names"
+
+DRIVERS=="?*", PROGRAM="vyatta_net_name %k $attr{address} $env{VYOS_IFNAME}", NAME="%c", GOTO="vyatta_net_end"
+
+LABEL="end_vyos_predef_names"
+
# ignore interfaces without a driver link like bridges and VLANs
DRIVERS=="?*", PROGRAM="vyatta_net_name %k $attr{address}", NAME="%c"