]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/ifup.sh: save return value of ifup
authorHarald Hoyer <harald@redhat.com>
Tue, 25 Aug 2015 09:20:30 +0000 (11:20 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 15:17:49 +0000 (16:17 +0100)
(cherry picked from commit b4006781e8a59dc69a0dd3836fce137f08b23001)

modules.d/40network/ifup.sh

index 381ff43b3d90a315a75e79a69f4fe476d88d2475..647c856236027d0fe75df317199380eed2e28fa3 100755 (executable)
@@ -373,6 +373,7 @@ for p in $(getargs ip=); do
                 do_static ;;
         esac
     done
+    ret=$?
 
     > /tmp/net.${netif}.up
 
@@ -380,7 +381,7 @@ for p in $(getargs ip=); do
         dhcp|on|any|dhcp6)
             ;;
         *)
-            if [ $? -eq 0 ]; then
+            if [ $ret -eq 0 ]; then
                 setup_net $netif
                 source_hook initqueue/online $netif
                 if [ -z "$manualup" ]; then