slack-autoupdate

Update your Slackware system automatically
Log | Files | Refs | README

commit b4538dfc0a1ec88b42399dd79f28aafe26d1ed90
parent 5a77ca874c46d256ac415cadb7d36cab2f57a1fd
Author: Slack Coder <slackcoder@server.ky>
Date:   Sun,  9 Jun 2024 13:23:19 -0500

Improve rc.slack-autoupdate messaging

Be clear about when the updates start being installed, and when
installation has completed.

Diffstat:
Msrc/rc.slack-autoupdate | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/rc.slack-autoupdate b/src/rc.slack-autoupdate @@ -9,6 +9,9 @@ export PATH=$PATH:/usr/local/bin:/usr/local/sbin +# Duration in seconds to wait before installing pending updates. +WAIT_TIME=5 + # Where packages are stored pending installation. You can use sub-directories # to order and group packages. PACKAGE_DIR="/var/spool/slack-autoupdate" @@ -19,9 +22,10 @@ if [ -z "$UPDATES" ]; then exit 0 fi -if read -r -t 5 -p "Installing updates, press enter to skip this process..."; then +if read -r -t "$WAIT_TIME" -p "Your system has pending software updates. They will be installed in ${WAIT_TIME} seconds. Press enter to skip..."; then exit 0 fi +echo " proceeding." OLD_KERNEL="$(md5sum /boot/vmlinuz | cut -f1 -d' ')" @@ -41,4 +45,6 @@ fi # This will error out if PACKAGE_DIR is accidentally unset. find "$PACKAGE_DIR" -mindepth 1 | xargs rm -fr +echo "All updates have been installed." + reboot