daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1ff636
From 434e13b009b4bd829c4ac827bdb53e3df61e5a6f Mon Sep 17 00:00:00 2001
1ff636
From: Lukas Nykryn <lnykryn@redhat.com>
1ff636
Date: Tue, 14 Apr 2015 17:11:48 +0200
1ff636
Subject: [PATCH] rules: bring back 80-net-name-slot.rules
1ff636
1ff636
---
1ff636
 Makefile.am                  |  3 ++-
1ff636
 rules/80-net-name-slot.rules | 14 ++++++++++++++
1ff636
 2 files changed, 16 insertions(+), 1 deletion(-)
1ff636
 create mode 100644 rules/80-net-name-slot.rules
1ff636
1ff636
diff --git a/Makefile.am b/Makefile.am
181b3f
index 4933f76bd..bec32c39e 100644
1ff636
--- a/Makefile.am
1ff636
+++ b/Makefile.am
1ff636
@@ -3570,7 +3570,8 @@ dist_udevrules_DATA += \
1ff636
 	rules/80-net-setup-link.rules \
1ff636
 	rules/95-udev-late.rules \
1ff636
 	rules/40-redhat.rules \
1ff636
-	rules/73-idrac.rules
1ff636
+	rules/73-idrac.rules \
1ff636
+        rules/80-net-name-slot.rules
1ff636
 
1ff636
 nodist_udevrules_DATA += \
1ff636
 	rules/99-systemd.rules
1ff636
diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
1ff636
new file mode 100644
181b3f
index 000000000..c5f1b3885
1ff636
--- /dev/null
1ff636
+++ b/rules/80-net-name-slot.rules
1ff636
@@ -0,0 +1,14 @@
1ff636
+# do not edit this file, it will be overwritten on update
1ff636
+
1ff636
+ACTION!="add", GOTO="net_name_slot_end"
1ff636
+SUBSYSTEM!="net", GOTO="net_name_slot_end"
1ff636
+NAME!="", GOTO="net_name_slot_end"
1ff636
+
1ff636
+IMPORT{cmdline}="net.ifnames"
1ff636
+ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
1ff636
+
1ff636
+NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
1ff636
+NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
1ff636
+NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
1ff636
+
1ff636
+LABEL="net_name_slot_end"