]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network-legacy/ifup: drop redundant if-statement
authorJonathan Lebon <jonathan@jlebon.com>
Wed, 19 Feb 2020 16:11:32 +0000 (11:11 -0500)
committerLukáš Nykrýn <lnykryn@redhat.com>
Tue, 25 Feb 2020 13:34:58 +0000 (14:34 +0100)
No need to check that `$ret` is 0, we're already running inside an
if-statement block which checks this.

modules.d/35network-legacy/ifup.sh

index 1d5a2e895b9d9b35c7cdb579cd6209707977769c..a3756c5dceb98af175f2a1948fbbf6ec545019f0 100755 (executable)
@@ -457,12 +457,10 @@ for p in $(getargs ip=); do
             dhcp|on|any|dhcp6)
             ;;
             *)
-                if [ $ret -eq 0 ]; then
-                    setup_net $netif
-                    source_hook initqueue/online $netif
-                    if [ -z "$manualup" ]; then
-                        /sbin/netroot $netif
-                    fi
+                setup_net $netif
+                source_hook initqueue/online $netif
+                if [ -z "$manualup" ]; then
+                    /sbin/netroot $netif
                 fi
                 ;;
         esac