From ba5a8c939722c5e0a2c33ae538e0dc6ec53a7fad Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 26 Apr 2026 01:36:02 +0200 Subject: [PATCH] docs: update dependency and sample config notes --- README.md | 9 +++++---- bin/netupgrade | 2 +- config/netupgrade/hypervisor-01.cfg | 2 +- state.md | 6 +++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ef0f856..65836fc 100644 --- a/README.md +++ b/README.md @@ -27,20 +27,21 @@ Supported actions: ## Requirements -Required: +Required locally: - `bash` - `ssh` - `whiptail` -- `sed` -- `tee` -- core utilities such as `rm` and `touch` +- core utilities such as `cat`, `tee`, `rm`, `touch`, and `mv` Optional log viewer: - `$EDITOR` if it points to an installed command - otherwise one of: `nano`, `vi`, `less` +Remote hosts must also provide the commands needed by the configured actions, such as: +`apt-get`, `yum`, `pkg`, `pacman`, `apk`, `docker`, `docker compose`, or `reboot`. + ## Install ### Install the executable diff --git a/bin/netupgrade b/bin/netupgrade index 17b15a5..03696f6 100755 --- a/bin/netupgrade +++ b/bin/netupgrade @@ -10,7 +10,7 @@ showHelp() { } checkDependencies() { - local -a REQUIRED_CMDS=(ssh whiptail cat tee rm touch) + local -a REQUIRED_CMDS=(ssh whiptail cat tee rm touch mv) local -a MISSING_CMDS=() local CMD diff --git a/config/netupgrade/hypervisor-01.cfg b/config/netupgrade/hypervisor-01.cfg index edc73ba..d148e2a 100644 --- a/config/netupgrade/hypervisor-01.cfg +++ b/config/netupgrade/hypervisor-01.cfg @@ -6,4 +6,4 @@ NODES+=("10.0.0.103;alpine-01;apk;reboot") NODES+=("10.0.0.104;redhat-01;yum;reboot") NODES+=("10.0.0.105;freebsd-01;pkg;reboot") NODES+=("10.0.0.211;docker-01;docker-stacks:/srv/stacks") -NODES+=("10.0.0.105;docker-01;cmd:reboot") +#NODES+=("10.0.0.211;docker-01;cmd:reboot") diff --git a/state.md b/state.md index 7a6f5a0..b0346d4 100644 --- a/state.md +++ b/state.md @@ -128,6 +128,9 @@ Supported action types currently include: - The `apk` action no longer passes `-y` to `apk upgrade`, because current Alpine `apk` does not accept that option there; `-y` remains a best-effort flag for other supported package managers - The `apt` action now uses `apt-get autoremove --purge` and no longer runs `apt-get purge` without arguments, which makes the cleanup step more meaningful and avoids a misleading command in the log - The `pacman` action was further hardened by simplifying orphan cleanup command construction, reducing quoting-related regressions while still skipping removal when no orphan packages are present +- `README.md` no longer lists `sed` as a required dependency and now better reflects the local utilities actually used by the script +- Startup dependency checks now include `mv`, which is required by the log-summary rewrite +- The sample configuration in `config/netupgrade/hypervisor-01.cfg` now comments out the alternate `docker-01` reboot step so the two-step example remains visible without being active by default ## Change guidance - Preserve backward compatibility for existing config files where possible @@ -153,7 +156,8 @@ Supported action types currently include: - Highest priority should go to defining an explicit execution and failure policy, because it currently affects operator trust more than missing features do - The next highest priority should be protecting against regressions in SSH command construction by documenting manual test cases for commands with spaces, pipes, redirections, `&&`, `||`, and quoted arguments - A small CLI usability pass would have strong value: `-f` currently only preselects nodes in `whiptail`, so a true non-interactive selection mode would improve automation without changing the overall project model -- The dependency list should be rechecked: `README.md` still mentions `sed`, while the current implementation no longer appears to require it after the log-summary rewrite +- The dependency list was realigned: `README.md` no longer mentions `sed`, and the script dependency check now includes `mv` for the log-summary rewrite +- The sample configuration set was clarified to avoid an active duplicate reboot step for `docker-01`; the alternate `cmd:reboot` example remains commented out for illustration - The sample configuration set should be reviewed for consistency; for example, duplicate or mismatched display names attached to different IPs increase the risk of accidental operations on the wrong host - Shell quality improvements should favor linting, targeted helpers, and incremental refactors before any broad strict-mode changes - Future testing should focus first on parser behavior, command construction, and result reporting rather than trying to build a large end-to-end framework immediately