Blame SOURCES/0306-network-parse-ip-opts.sh-bind-enx-interface-to-the-M.patch

64b87c
From 2eb3b00133d572183ca022b626d200549ce4ffa8 Mon Sep 17 00:00:00 2001
64b87c
From: Harald Hoyer <harald@redhat.com>
64b87c
Date: Tue, 18 Aug 2015 12:13:55 +0200
64b87c
Subject: [PATCH] network/parse-ip-opts.sh: bind enx* interface to the MAC
64b87c
64b87c
do it automatically for the persistent naming scheme
64b87c
---
64b87c
 modules.d/40network/parse-ip-opts.sh | 10 ++++++++++
64b87c
 1 file changed, 10 insertions(+)
64b87c
64b87c
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
1755ca
index faee8f99..7c403f79 100755
64b87c
--- a/modules.d/40network/parse-ip-opts.sh
64b87c
+++ b/modules.d/40network/parse-ip-opts.sh
64b87c
@@ -113,6 +113,16 @@ for p in $(getargs ip=); do
64b87c
         die "Server-ip or dhcp for netboot needed, but current arguments say otherwise"
64b87c
     fi
64b87c
 
64b87c
+    if str_starts "$dev" "enx" && [ ${#dev} -eq 15 ]; then
64b87c
+        printf -- "ifname=%s:%s:%s:%s:%s:%s:%s\n" \
64b87c
+               "$dev" \
64b87c
+               "${dev:3:2}" \
64b87c
+               "${dev:5:2}" \
64b87c
+               "${dev:7:2}" \
64b87c
+               "${dev:9:2}" \
64b87c
+               "${dev:11:2}" \
64b87c
+               "${dev:13:2}" >> /etc/cmdline.d/80-enx.conf
64b87c
+    fi
64b87c
 done
64b87c
 
64b87c
 # put BOOTIF in IFACES to make sure it comes up