From: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>

If no network related params are specific, but rd.neednet=1 is set,
the default initqueue action is to wait until one of the network
interfaces is marked as setup properly.

This also help with initqueue's race condition when the network interface
shows upd late

References: bnc#866771

Signed-off-by: Hannes Reinecke <h...@suse.de>
Signed-off-by: Thomas Renninger <tr...@suse.de>
---
 modules.d/40network/net-genrules.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules.d/40network/net-genrules.sh 
b/modules.d/40network/net-genrules.sh
index 77e47b5..2c955b7 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -95,7 +95,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
     else
         cond='ACTION=="add", SUBSYSTEM=="net"'
         # if you change the name of "91-default-net.rules", also change 
modules.d/80cms/cmssetup.sh
-        echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
+        if [ "$NEEDNET" = "1" ]; then
+            echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
+            echo "[ -f /tmp/net.*.did-setup ]" 
>$hookdir/initqueue/finished/wait-network.sh
+        fi
     fi
 
 # if you change the name of "90-net.rules", also change 
modules.d/80cms/cmssetup.sh
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to