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