From c138d9201e3544ce47534fc6401797f1d8611b9b Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 26 Apr 2026 02:08:34 +0200 Subject: [PATCH] fix: detach reboot command to avoid false SSH failures --- bin/netupgrade | 5 ++++- state.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/netupgrade b/bin/netupgrade index 03696f6..c2bb1bf 100755 --- a/bin/netupgrade +++ b/bin/netupgrade @@ -201,8 +201,11 @@ runCmd() { # $1=host $2=name $3=cmd case ${CMD} in reboot) - if ! runSSH "${HOST}" reboot | tee -a "${LOGFILENAME}"; then + echo "reboot (detached)" | tee -a "${LOGFILENAME}" + if ! runSSH "${HOST}" sh -c 'nohup sh -c "reboot || /sbin/reboot || shutdown -r now" >/dev/null 2>&1