]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/parse-ip-opts.sh: bind enx* interface to the MAC
authorHarald Hoyer <harald@redhat.com>
Tue, 18 Aug 2015 10:13:55 +0000 (12:13 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 14:58:12 +0000 (15:58 +0100)
do it automatically for the persistent naming scheme

(cherry picked from commit 2eb3b00133d572183ca022b626d200549ce4ffa8)

modules.d/40network/parse-ip-opts.sh

index 33bb0681d5ce1c2d5f5a83c8a85dd830b7eec860..12f476598c1fc9869fd99ea2921d7df296b672ad 100755 (executable)
@@ -111,6 +111,16 @@ for p in $(getargs ip=); do
         die "Server-ip or dhcp for netboot needed, but current arguments say otherwise"
     fi
 
+    if str_starts "$dev" "enx" && [ ${#dev} -eq 15 ]; then
+        printf -- "ifname=%s:%s:%s:%s:%s:%s:%s\n" \
+               "$dev" \
+               "${dev:3:2}" \
+               "${dev:5:2}" \
+               "${dev:7:2}" \
+               "${dev:9:2}" \
+               "${dev:11:2}" \
+               "${dev:13:2}" >> /etc/cmdline.d/80-enx.conf
+    fi
 done
 
 # put BOOTIF in IFACES to make sure it comes up