teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

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

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