17094c
From fa15223b70c04de0fdbd209a4bb1cb74876f7cfb Mon Sep 17 00:00:00 2001
17094c
From: Jonathan Lebon <jonathan@jlebon.com>
17094c
Date: Wed, 19 Feb 2020 11:11:32 -0500
17094c
Subject: [PATCH] network-legacy/ifup: drop redundant if-statement
17094c
17094c
No need to check that `$ret` is 0, we're already running inside an
17094c
if-statement block which checks this.
17094c
17094c
(cherry picked from commit 7795fde44c54bfe753cc07999a4c2f9dd7e2820d)
17094c
17094c
Resolves: #1807395
17094c
---
17094c
 modules.d/35network-legacy/ifup.sh | 10 ++++------
17094c
 1 file changed, 4 insertions(+), 6 deletions(-)
17094c
17094c
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
17094c
index dd18d70b..eb7d2eb4 100755
17094c
--- a/modules.d/35network-legacy/ifup.sh
17094c
+++ b/modules.d/35network-legacy/ifup.sh
17094c
@@ -457,12 +457,10 @@ for p in $(getargs ip=); do
17094c
             dhcp|on|any|dhcp6)
17094c
             ;;
17094c
             *)
17094c
-                if [ $ret -eq 0 ]; then
17094c
-                    setup_net $netif
17094c
-                    source_hook initqueue/online $netif
17094c
-                    if [ -z "$manualup" ]; then
17094c
-                        /sbin/netroot $netif
17094c
-                    fi
17094c
+                setup_net $netif
17094c
+                source_hook initqueue/online $netif
17094c
+                if [ -z "$manualup" ]; then
17094c
+                    /sbin/netroot $netif
17094c
                 fi
17094c
                 ;;
17094c
         esac
17094c