summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-01-25 11:47:47 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-01-28 17:42:47 -0500
commite34b05dc4c5c8b48cbc0428b29344f7634b3b4a5 (patch)
tree6fa23a172bd969ba20c8c8e2c80121a7f20bad97 /rules
parentab779c81460ce48e6b270977ef339b32d87c1f41 (diff)
Port new net_id capabilities from systemd-udev-197
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'rules')
-rw-r--r--rules/80-net-name-slot.rules11
-rw-r--r--rules/Makefile.am1
2 files changed, 12 insertions, 0 deletions
diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
new file mode 100644
index 0000000000..2834e82dbf
--- /dev/null
+++ b/rules/80-net-name-slot.rules
@@ -0,0 +1,11 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="net_name_slot_end"
+SUBSYSTEM!="net", GOTO="net_name_slot_end"
+NAME!="", GOTO="net_name_slot_end"
+
+NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
+NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
+NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
+
+LABEL="net_name_slot_end"
diff --git a/rules/Makefile.am b/rules/Makefile.am
index 6adbd6e469..1741bd2ed8 100644
--- a/rules/Makefile.am
+++ b/rules/Makefile.am
@@ -16,6 +16,7 @@ dist_udevrules_DATA = \
75-probe_mtd.rules \
75-tty-description.rules \
78-sound-card.rules \
+ 80-net-name-slot.rules \
95-udev-late.rules
if HAVE_MODULES