| Age | Commit message (Collapse) | Author | Files | Lines |
|
exec > >(tee ...) sent slackpkg's TUI (dialog writes to stderr) into the
log pipe, so the curses interface never reached the terminal and output
was mangled. Only tee non-interactive runs now; interactive runs skip
logging and keep fds 0/1/2 on the tty. Add an INT trap so Ctrl+C aborts
with 130 instead of letting the run continue.
|
|
Unattended clean-system lists removable packages but removes nothing by
design, and with no reminder they were easy to miss. Non-interactive
clean-system exits 0 when it listed candidates and 20 when there were
none, so set CLEAN_PENDING from the return code and print a closing line
telling the user to re-run with -i.
|
|
/var/log/dist-upgrade.log grows across runs: rotate weekly, keep 8
compressed, mode 0640 root:root. Uses create rather than copytruncate
since the script reopens the file on each run.
|
|
Non-interactive runs leave obsolete .new config files in place: new-config
exits without acting and there was no record to debug later. Tee the whole
run (script messages plus slackpkg output) to LOG, default
/var/log/dist-upgrade.log, with a timestamped header per run (a second one
on a 50-restart). LOG= disables it.
Also report leftover .new files under /etc and /boot at the end of a run.
|
|
slackpkg's cleanup() exits 20 when no packages match (benign, e.g. an
install-new with nothing to do) and 50 when it upgraded itself and wants
the operation restarted. Treating every nonzero as fatal aborted the run
on the very common 20.
Add handle_rc(): 0 and 20 continue, real errors abort with the exit code,
and 50 re-execs the script once with the original arguments, guarded by
DIST_UPGRADE_RESTARTS so a repeated 50 aborts instead of looping. All
steps now go through it.
|
|
|