network:ifup handle bootif style interfaces
authorHarald Hoyer <harald@redhat.com>
Mon, 29 Jul 2013 14:06:28 +0000 (16:06 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 29 Jul 2013 14:06:28 +0000 (16:06 +0200)
e.g. ip=77-77-6f-6f-64-73:dhcp

modules.d/40network/ifup.sh

index 36c6b08..32f0ff2 100755 (executable)
@@ -287,6 +287,17 @@ for p in $(getargs ip=); do
     # skip ibft
     [ "$autoconf" = "ibft" ] && continue
 
+    case "$dev" in
+        ??:??:??:??:??:??)  # MAC address
+            _dev=$(iface_for_mac $dev)
+            [ -n "$_dev" ] && dev="$_dev"
+            ;;
+        ??-??-??-??-??-??)  # MAC address in BOOTIF form
+            _dev=$(iface_for_mac $(fix_bootif $dev))
+            [ -n "$_dev" ] && dev="$_dev"
+            ;;
+    esac
+
     # If this option isn't directed at our interface, skip it
     [ -n "$dev" ] && [ "$dev" != "$netif" ] && \
     [ "$use_bridge" != 'true' ] && \