blob: 42db67a3eff653afb66e35f39ac37bb66697c25c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
#
# System local command to install the kernel into the system boot loader.
#
# The /boot/vmlinuz-huge softlink points to the last installed kernel.
KERNEL_VERSION="$(realpath /boot/vmlinuz-huge | sed 's/.*\/.*-\(.*\)/\1/')"
if [ "$1" ]; then
KERNEL_VERSION="$(echo "$1" | sed 's/.*\/.*-\(.*\)/\1/')"
fi
if [ -z "$KERNEL_VERSION" ]; then
>&2 echo "The kernel version could not be detected from the filename."
exit 1
fi
echo "Installing kernel version $KERNEL_VERSION into the efi..."
cp -H /boot/vmlinuz-huge /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
fi
|