Blame SOURCES/0314-network-ifup.sh-do_static-error-out-if-interface-cou.patch

64b87c
From 77f46adf5e5ab1f6da2e459bb55435d4b70842c5 Mon Sep 17 00:00:00 2001
64b87c
From: Harald Hoyer <harald@redhat.com>
64b87c
Date: Wed, 19 Aug 2015 13:59:40 +0200
64b87c
Subject: [PATCH] network/ifup.sh:do_static(): error out, if interface could
64b87c
 not be brought up
64b87c
64b87c
---
64b87c
 modules.d/40network/ifup.sh | 6 +++++-
64b87c
 1 file changed, 5 insertions(+), 1 deletion(-)
64b87c
64b87c
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
64b87c
index 8a5a606..1ee89bf 100755
64b87c
--- a/modules.d/40network/ifup.sh
64b87c
+++ b/modules.d/40network/ifup.sh
64b87c
@@ -155,7 +155,11 @@ do_ipv6auto() {
64b87c
 do_static() {
64b87c
     strstr $ip '*:*:*' && load_ipv6
64b87c
 
64b87c
-    linkup $netif
64b87c
+    if ! linkup $netif; then
64b87c
+        warn "Could bring interface $netif up!"
64b87c
+        return 1
64b87c
+    fi
64b87c
+
64b87c
     [ -n "$macaddr" ] && ip link set address $macaddr dev $netif
64b87c
     [ -n "$mtu" ] && ip link set mtu $mtu dev $netif
64b87c
     if strstr $ip '*:*:*'; then