From 83a015e5717b0b9dfb74590557de71b9464c28dd Mon Sep 17 00:00:00 2001 From: lgromero Date: Tue, 19 Nov 2024 10:33:37 +0100 Subject: [PATCH] refs #1161 adds attemps of pings in getNetworking loop --- includes/etc/initramfs-tools/scripts/oginit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/etc/initramfs-tools/scripts/oginit b/includes/etc/initramfs-tools/scripts/oginit index 690c215..59e204e 100755 --- a/includes/etc/initramfs-tools/scripts/oginit +++ b/includes/etc/initramfs-tools/scripts/oginit @@ -82,10 +82,14 @@ mountroot () [ $? == 0 ] && sh || echo " " if [ -n "$oglive" ] then + attempts=0 while !(ping -c 1 $oglive &> /dev/null) do + attempts=$((attempts+1)) + echo "Attempt $attempts: Waiting for network connection... attempting to ping $oglive" ogConfigureNetworking done + echo "Connection established after $attempts attempts." fi log_success_msg "config networking" ogConfigureLoopback