blob: 969f52e0d308425f9dd2ed538202dbd79e782a4a (
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 softlink points to the last installed kernel.
KERNEL_VERSION="$(realpath /boot/vmlinuz | sed 's/.*\/.*-\(.*\)/\1/')"
if [ "$1" ]; then
KERNEL_VERSION="$(realpath "$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 /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
|