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

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