summaryrefslogtreecommitdiffstats
path: root/core/modules/slx-network-configs-targets
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/slx-network-configs-targets')
-rwxr-xr-xcore/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_online6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_online b/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_online
index aaee9c32..86aa3da2 100755
--- a/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_online
+++ b/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_online
@@ -8,6 +8,7 @@ while ! grep -q ^nameserver /etc/resolv.conf && [ "$w" -lt 10 ]; do
let w++
sleep 1
done
+ns=$w
# We don't consider a missing nameserver fatal, but a missing gateway, if no proxy is set
. /etc/profile
@@ -17,5 +18,10 @@ while [ -z "$http_proxy" ] && [ -z "$ALL_PROXY" ] && ! ip route show | grep -q ^
sleep 1
. /etc/profile
done
+gw=$(( w - ns ))
+
+if [ "$ns" -gt 2 ] || [ "$gw" -gt 2 ]; then
+ echo "Waited $ns seconds for DNS, $gw seconds for default gateway/proxy"
+fi
exit 0