1
0

fix: simplify reboot to direct SSH invocation

This commit is contained in:
2026-05-01 22:00:32 +02:00
parent 0360323c10
commit 5728e8769a
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -48,7 +48,7 @@
- `SSH_USER` is configurable and defaults to `root`
- `NODES` parsing was hardened to preserve spaces in action values such as `cmd:...`
- `cmd:<...>` is executed through a remote shell to support shell operators, but remains intentionally powerful and unsafe
- `reboot` uses a detached remote command to reduce false failures caused by expected SSH disconnects
- `reboot` now uses a direct SSH `reboot` invocation to keep the remote reboot path simple and predictable
- `docker-stacks` runs through a remote shell script sent over SSH stdin to improve path handling and quoting
- Startup dependency checks cover required local commands, including `mv` for log-summary rewriting
@@ -67,7 +67,7 @@
- Log viewer fallback was made more flexible
- `NODES` parsing was hardened to preserve spaces in action values
- SSH execution was centralized and made configurable through `SSH_USER`
- Remote command construction was improved for `pacman`, `docker-stacks`, and `reboot`
- Remote command construction was improved for `pacman` and `docker-stacks`; `reboot` was simplified to a direct SSH command
- Log summary generation was rewritten to avoid `sed -i` interpolation and now replaces the log atomically
- `apk` and `apt` cleanup behavior was corrected to better match real package-manager semantics
- The sample configuration in `config/netupgrade/hypervisor-01.cfg` now keeps the alternate `docker-01` reboot example commented out rather than active by default
+2 -4
View File
@@ -201,11 +201,9 @@ runCmd() { # $1=host $2=name $3=cmd
case ${CMD} in
reboot)
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
echo "reboot" | tee -a "${LOGFILENAME}"
if ! runSSH "${HOST}" reboot | tee -a "${LOGFILENAME}"; then
ERROR=1
else
sleep 1
fi
;;
apt)