summaryrefslogtreecommitdiff
path: root/sysconf/65-vyatta-net.rules
blob: a583b363c07e02758f5aa68cd04caa6f7f4985c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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*", 			GOTO="vyatta_net_end"

# ignore vlan's
KERNEL=="*.*",				GOTO="vyatta_net_end"

# ignore "secondary" monitor interfaces of mac80211 drivers
KERNEL=="wlan*", ATTRS{type}=="803",	GOTO="vyatta_net_end"

# ignore interfaces without a driver link like bridges and VLANs
DRIVERS=="?*", PROGRAM="vyatta_net_name %k $attr{address}", NAME="%c"

LABEL="vyatta_net_end"