diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 09:01:36 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 09:01:36 +0200 |
| commit | dd1301613f85db584bd066df4ac68f8aa68ea57a (patch) | |
| tree | 240aef1f886a9df4a7bdea63362b8a144d8cce06 | |
| parent | 7c9e7568f56a79b41e8c343e1189eb9210e61fd2 (diff) | |
| download | dist-upgrade-dd1301613f85db584bd066df4ac68f8aa68ea57a.tar.gz dist-upgrade-dd1301613f85db584bd066df4ac68f8aa68ea57a.zip | |
An unattended run answers new-config non-interactively, so .new files
can remain. When the leftover scan finds any, a non-interactive run now
ends with a hint to run 'slackpkg new-config' to merge them.
The r8125 rebuild now runs before the leftover scan and the recaps, so
its build output no longer buries them and any .new file it installs is
listed too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | README.md | 5 | ||||
| -rwxr-xr-x | dist-upgrade | 13 |
2 files changed, 13 insertions, 5 deletions
@@ -39,12 +39,13 @@ to `/etc/logrotate.d/`. - the modules `mkinitrd_command_generator.sh` says are needed against the initrd's contents, - the module set against the pre-upgrade snapshot (notices modules lost). -4. Lists any leftover `.new` config files. -5. If the `r8125` package is installed and the newest kernel has no `r8125` +4. If the `r8125` package is installed and the newest kernel has no `r8125` module, rebuilds it from the SBo SlackBuild in `R8125_DIR` (default `/var/lib/sbopkg/SBo-git/network/r8125`) and installs it with `upgradepkg`. The tree is used as-is; sync it first if the new kernel needs a newer driver. +5. Lists any leftover `.new` config files; an unattended run also suggests + `slackpkg new-config` to merge them. 6. Reports whether a reboot is recommended. A non-interactive run is appended to `LOG`, with a timestamped header per run, diff --git a/dist-upgrade b/dist-upgrade index d039363..04a03fc 100755 --- a/dist-upgrade +++ b/dist-upgrade @@ -27,6 +27,7 @@ TMPDIR_SNAP="" ORIG_ARGS=("$@") RESTARTS=${DIST_UPGRADE_RESTARTS:-0} CLEAN_PENDING=0 +NEWCONFIG_PENDING=0 die() { printf 'dist-upgrade: %s\n' "$*" >&2; exit 1; } warn() { printf 'WARNING: %s\n' "$*" >&2; } @@ -170,6 +171,7 @@ report_leftovers() { [ -n "$found" ] || return 0 info "Leftover .new config files (review, then adopt or delete):" printf '%s\n' "$found" + NEWCONFIG_PENDING=1 } # ponytail: the SBo tree is used as-is, not synced; sync it first if a new @@ -355,15 +357,20 @@ run_step new-config check_initrd +running=$(uname -r) +newver=$(newest_kernel) +# before the leftover scan and recaps, so the build output does not bury them +[ -n "$newver" ] && rebuild_r8125 "$newver" + report_leftovers if [ "$CLEAN_PENDING" -eq 1 ]; then info "clean-system listed packages not in the official set; re-run dist-upgrade with -i (or run 'slackpkg clean-system') to review and remove them. See $LOG." fi +if [ "$INTERACTIVE" -eq 0 ] && [ "$NEWCONFIG_PENDING" -eq 1 ]; then + info "Leftover .new config files remain; run 'slackpkg new-config' to review and merge them." +fi -running=$(uname -r) -newver=$(newest_kernel) -[ -n "$newver" ] && rebuild_r8125 "$newver" if [ -n "$newver" ] && [ "$running" != "$newver" ]; then info "Reboot recommended: running kernel $running, newest installed $newver." fi |
