]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/ifup.sh:do_static(): error out, if interface could not be brought up
authorHarald Hoyer <harald@redhat.com>
Wed, 19 Aug 2015 11:59:40 +0000 (13:59 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 15:15:57 +0000 (16:15 +0100)
(cherry picked from commit 77f46adf5e5ab1f6da2e459bb55435d4b70842c5)

modules.d/40network/ifup.sh

index 7da9171bb92a90079fbdac6cbd04256b3e11959d..69a4567bbfc553ec1afec5955c314c5f6fa287c7 100755 (executable)
@@ -150,7 +150,11 @@ do_ipv6auto() {
 do_static() {
     strglobin $ip '*:*:*' && load_ipv6
 
-    linkup $netif
+    if ! linkup $netif; then
+        warn "Could bring interface $netif up!"
+        return 1
+    fi
+
     [ -n "$macaddr" ] && ip link set address $macaddr dev $netif
     [ -n "$mtu" ] && ip link set mtu $mtu dev $netif
     if strglobin $ip '*:*:*'; then