File 0626-35network-legacy-correct-conditional-for-creating-di.patch of Package dracut

From ea70e9047fd42c1b210928dbd3c8de1daaffd25b Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Thu, 9 Jul 2020 11:12:15 +0200
Subject: [PATCH] 35network-legacy: correct conditional for creating did-setup
 file

fixes bsc#1172807
---
 modules.d/40network/ifup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 7ae84bf8..c13664af 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -575,7 +575,7 @@ for p in $(getargs ip=); do
         esac
     done
 
-    if [ $? -eq 0 ]; then
+    if [ $? -eq 0 ] && [ -n "$(ls /tmp/leaseinfo.${netif}*)" ]; then
         > /tmp/net.$netif.did-setup
        [ -z "$DO_VLAN" ] && \
        [ -e /sys/class/net/$netif/address ] && \
@@ -609,7 +609,7 @@ if [ ! -e /tmp/net.${netif}.up ]; then
             do_dhcp -4
         fi
     fi
-    if [ $? -eq 0 ] && [ -f /tmp/leaseinfo.${netif}* ]; then
+    if [ $? -eq 0 ] && [ -n "$(ls /tmp/leaseinfo.${netif}*)" ]; the
         bring_online
     fi
 fi
-- 
2.27.0

openSUSE Build Service is sponsored by