]> 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>
Tue, 25 Aug 2015 09:20:30 +0000 (11:20 +0200)
modules.d/40network/ifup.sh

index e51b453a005166adc0e953141750678e3f6c0b0a..2562af610b849013d9504c769235d66d8e3ab679 100755 (executable)
@@ -396,6 +396,7 @@ for p in $(getargs ip=); do
                 do_static ;;
         esac
     done
+    ret=$?
 
     > /tmp/net.${netif}.up
 
@@ -403,7 +404,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