aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-06-09 13:23:19 -0500
committerSlack Coder <slackcoder@server.ky>2024-06-09 13:23:19 -0500
commitb4538dfc0a1ec88b42399dd79f28aafe26d1ed90 (patch)
tree1ffad4c42cb56a10dda4dcf97e3d4dd7912a873b /src
parent5a77ca874c46d256ac415cadb7d36cab2f57a1fd (diff)
downloadslack-autoupdate-b4538dfc0a1ec88b42399dd79f28aafe26d1ed90.tar.xz
Improve rc.slack-autoupdate messaging
Be clear about when the updates start being installed, and when installation has completed.
Diffstat (limited to 'src')
-rw-r--r--src/rc.slack-autoupdate8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rc.slack-autoupdate b/src/rc.slack-autoupdate
index cb82f09..4e10bdf 100644
--- 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