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

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