1
0

feat: add dnf action support

This commit is contained in:
2026-04-26 02:57:22 +02:00
parent 8b566f0793
commit faeac57bf4
4 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ Supported actions:
- `apt`
- `yum`
- `dnf`
- `pkg`
- `pacman`
- `apk`
@@ -40,7 +41,7 @@ Optional log viewer:
- 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`.
`apt-get`, `yum`, `dnf`, `pkg`, `pacman`, `apk`, `docker`, `docker compose`, or `reboot`.
## Install
+2
View File
@@ -26,6 +26,7 @@
## Supported actions
- `apt`
- `yum`
- `dnf`
- `pkg`
- `pacman`
- `apk`
@@ -71,6 +72,7 @@
- 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
- A new `dnf` action was added alongside the existing `yum` action to support newer RPM-based systems without breaking existing configurations
## Change guidance
- `STATE.md` should stay focused on current state, architecture, and constraints
+9
View File
@@ -242,6 +242,15 @@ runCmd() { # $1=host $2=name $3=cmd
ERROR=1
fi
;;
dnf)
if [ "${YES}" -eq 1 ]; then
YESARG="-y"
fi
echo "dnf ${YESARG} upgrade --refresh" | tee -a "${LOGFILENAME}"
if ! runSSH "${HOST}" dnf ${YESARG} upgrade --refresh | tee -a "${LOGFILENAME}"; then
ERROR=1
fi
;;
pkg)
if [ "${YES}" -eq 1 ]; then
YESARG="-y"
+1
View File
@@ -4,6 +4,7 @@ NODES+=("10.0.0.101;debian-01;apt;reboot")
NODES+=("10.0.0.102;archlinux-01;pacman;reboot")
NODES+=("10.0.0.103;alpine-01;apk;reboot")
NODES+=("10.0.0.104;redhat-01;yum;reboot")
NODES+=("10.0.0.106;rocky-01;dnf;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.211;docker-01;cmd:reboot")