]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/net-lib.sh: correctly set mac address for ip=...:<mtu>:<mac>
authorHarald Hoyer <harald@redhat.com>
Wed, 13 Jan 2016 12:43:38 +0000 (13:43 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 13 Jan 2016 12:43:38 +0000 (13:43 +0100)
if ip=...:<mtu>:<mac> was specified, macadress was not set

modules.d/40network/net-lib.sh

index 256826e63cc071eaa79e0f2dfb95f2b3be733a27..31f1a5672b14142dbbd300bde22d854c75f74ced 100755 (executable)
@@ -427,6 +427,9 @@ ip_to_var() {
                     ;;
                 [0-9]*)
                     mtu="$8"
+                    if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then
+                        macaddr="${9}:${10}:${11}:${12}:${13}:${14}"
+                    fi
                     ;;
                 *)
                     if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then