aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/rc.update
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc.update')
-rw-r--r--src/rc.update22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/rc.update b/src/rc.update
index 7c80cdc..afc45d9 100644
--- a/src/rc.update
+++ b/src/rc.update
@@ -7,26 +7,11 @@
# will run if found. We recommend placing this under /usr/local/sbin.
#
-# A local Slackware mirror with just enough information to support slackpkg.
-#
-# This step could be skipped if slackpkg supports downloading updates without
-# installing them.
-LOCAL_MIRROR=${LOCAL_MIRROR:-"/var/cache/slack-autoupdate/mirror"}
-
-# slackpkg exit code when updates are available.
-SLACKPKG_UPDATES_PENDING=100
-
# Where packages are stored pending installation. You can use sub-directories
# to order and group packages.
UPDATE_DIR="/var/spool/slack-autoupdate"
-# Where information about pending updates is stored.
-UPDATE_INFO="$UPDATE_DIR/info.txt"
-
-# Where information about failed updates is stored.
-UPDATE_ERROR="$UPDATE_DIR/error.txt"
-
-UPDATES=$(find "$UPDATE_DIR" -name '*.t*z' | sort)
+UPDATES="$(find "$UPDATE_DIR" -name '*.t*z' | sort)"
if [ -z "$UPDATES" ]; then
exit 0
@@ -39,8 +24,7 @@ fi
OLD_KERNEL="$(realpath /boot/vmlinuz)"
for PKG in $UPDATES; do
- upgradepkg --install-new "$PKG" &&
- rm "$PKG"
+ upgradepkg --install-new "$PKG"
done
NEW_KERNEL="$(realpath /boot/vmlinuz)"
@@ -51,6 +35,6 @@ if [ "$OLD_KERNEL" != "$NEW_KERNEL" ]; then
fi
# All package updates have been processed.
-find "$UPDATE_DIR" -mindepth 1 -not -path "$UPDATE_DIR_IGNORED/*" | xargs rm -fr
+find "$UPDATE_DIR" -mindepth 1 | xargs rm -fr
reboot