1
0

fix: detach reboot command to avoid false SSH failures

This commit is contained in:
2026-04-26 02:08:34 +02:00
parent ba5a8c9397
commit c138d9201e
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -201,8 +201,11 @@ runCmd() { # $1=host $2=name $3=cmd
case ${CMD} in case ${CMD} in
reboot) 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 </dev/null &' | tee -a "${LOGFILENAME}"; then
ERROR=1 ERROR=1
else
sleep 1
fi fi
;; ;;
apt) apt)
+1
View File
@@ -121,6 +121,7 @@ Supported action types currently include:
- The `pacman` orphan cleanup remote command now avoids nested `bash -lc` argument-passing issues by selecting between two simple remote `sh -c` commands, one with `--noconfirm` and one without - The `pacman` orphan cleanup remote command now avoids nested `bash -lc` argument-passing issues by selecting between two simple remote `sh -c` commands, one with `--noconfirm` and one without
- The `docker-stacks` action uses a remote shell script sent over SSH stdin, with the stack directory exported as a remote environment assignment before `bash -s`, to keep path handling working after recent SSH command-construction changes - The `docker-stacks` action uses a remote shell script sent over SSH stdin, with the stack directory exported as a remote environment assignment before `bash -s`, to keep path handling working after recent SSH command-construction changes
- Unknown actions and reboot SSH failures now propagate error status more consistently - Unknown actions and reboot SSH failures now propagate error status more consistently
- The `reboot` action now triggers a detached remote reboot command (`reboot || /sbin/reboot || shutdown -r now` under `nohup`) so an expected SSH disconnect during restart is less likely to be reported as a failure
- A focused code review identified the next recommended work items and suggested splitting them into separate commits rather than combining them in one larger hardening change - A focused code review identified the next recommended work items and suggested splitting them into separate commits rather than combining them in one larger hardening change
- `whiptail` checklist defaults are now passed explicitly as `ON`/`OFF`, and selected items are parsed through a dedicated helper instead of relying on raw shell word splitting - `whiptail` checklist defaults are now passed explicitly as `ON`/`OFF`, and selected items are parsed through a dedicated helper instead of relying on raw shell word splitting
- The CLI help and README now clarify that `-f` preselects all nodes in the interactive checklist - The CLI help and README now clarify that `-f` preselects all nodes in the interactive checklist