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