Blame SOURCES/0124-rules-bring-back-80-net-name-slot.rules.patch

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