aboutsummaryrefslogtreecommitdiff
path: root/src/rc.slack-autoupdate
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-03-25 13:29:55 -0500
committerSlack Coder <slackcoder@server.ky>2024-03-25 13:33:16 -0500
commit5b15f85fd6506716b87873767045a646076faa00 (patch)
tree61db4718d8627dda9d9ae304d4da81dd98af711b /src/rc.slack-autoupdate
parent6ba6dd8def236c175c429cdb448cae7b9721955f (diff)
downloadslack-autoupdate-5b15f85fd6506716b87873767045a646076faa00.tar.xz
Improve kernel update handling
Handle more generic situations: - Use /boot/vmlinuz instead of /boot/vmlinuz-huge. - Use the kernel md5sum to confirm kernel changes.
Diffstat (limited to 'src/rc.slack-autoupdate')
-rw-r--r--src/rc.slack-autoupdate6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rc.slack-autoupdate b/src/rc.slack-autoupdate
index afc45d9..2f17dc9 100644
--- a/src/rc.slack-autoupdate
+++ b/src/rc.slack-autoupdate
@@ -21,16 +21,16 @@ if read -r -t 5 -p "Installing updates, press enter to skip this process..."; th
exit 0
fi
-OLD_KERNEL="$(realpath /boot/vmlinuz)"
+OLD_KERNEL="$(md5sum /boot/vmlinuz | cut -f1 -d' ')"
for PKG in $UPDATES; do
upgradepkg --install-new "$PKG"
done
-NEW_KERNEL="$(realpath /boot/vmlinuz)"
+NEW_KERNEL="$(md5sum /boot/vmlinuz | cut -f1 -d' ')"
if [ "$OLD_KERNEL" != "$NEW_KERNEL" ]; then
if command -v install-kernel &> /dev/null; then
- install-kernel "$NEW_KERNEL"
+ install-kernel /boot/vmlinuz
fi
fi