Keep attempting to bring up the network

After a total power outage (system and networking gear), it's possible
that the system boots up and blow through all the timeouts for DHCP
before the network is operational. Unfortunately, I can't always solve
that.
This commit is contained in:
Paul Aurich
2022-12-06 20:13:10 -08:00
parent d28843e531
commit 41ed765b9a
3 changed files with 34 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ wait_for_tailscaled()
# SC3043: In POSIX sh, 'local' is undefined.
local pid exe timer="$TAILSCALE_SHUTDOWN_TIMEOUT"
pid="$(cat "$PIDFILE" 2>/dev/null)" || return 1
rm -f "$PIDFILE"
while [ $timer -gt 0 ] && exe="$(readlink -f "/proc/$pid/exe" 2>/dev/null)"; do
if [ "$exe" = "$EXE" ]; then
@@ -60,8 +61,6 @@ if PID="$(wait_for_tailscaled)"; then
log_end_msg
fi
rm -f "$PIDFILE"
if [ "$BOOT" != nfs ] && [ "$IFDOWN" != none ]; then
for IFACE in /sys/class/net/$IFDOWN; do
[ -e "$IFACE" ] || continue