aboutsummaryrefslogtreecommitdiff
path: root/src/install-kernel
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/install-kernel
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/install-kernel')
-rw-r--r--src/install-kernel4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/install-kernel b/src/install-kernel
index 42db67a..64c9ee5 100644
--- a/src/install-kernel
+++ b/src/install-kernel
@@ -4,7 +4,7 @@
#
# The /boot/vmlinuz-huge softlink points to the last installed kernel.
-KERNEL_VERSION="$(realpath /boot/vmlinuz-huge | sed 's/.*\/.*-\(.*\)/\1/')"
+KERNEL_VERSION="$(realpath /boot/vmlinuz | sed 's/.*\/.*-\(.*\)/\1/')"
if [ "$1" ]; then
KERNEL_VERSION="$(echo "$1" | sed 's/.*\/.*-\(.*\)/\1/')"
fi
@@ -15,7 +15,7 @@ if [ -z "$KERNEL_VERSION" ]; then
fi
echo "Installing kernel version $KERNEL_VERSION into the efi..."
-cp -H /boot/vmlinuz-huge /efi/EFI/Slackware/vmlinuz
+cp -H /boot/vmlinuz /efi/EFI/Slackware/vmlinuz
if [ -f /etc/mkinitrd.conf ]; then
echo "Installing initialized ram disk into the efi..."
mkinitrd -F -k "$KERNEL_VERSION" >/dev/null