fix: detach reboot command to avoid false SSH failures
This commit is contained in:
+4
-1
@@ -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 </dev/null &' | tee -a "${LOGFILENAME}"; then
|
||||
ERROR=1
|
||||
else
|
||||
sleep 1
|
||||
fi
|
||||
;;
|
||||
apt)
|
||||
|
||||
@@ -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 `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
|
||||
- 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
|
||||
- `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
|
||||
|
||||
Reference in New Issue
Block a user