slack-autoupdate

Update your Slackware system automatically
git clone git://git.server.ky/slackcoder/slack-autoupdate
Log | Files | Refs | README

install-kernel (686B)


      1 #!/bin/sh
      2 #
      3 # System local command to install the kernel into the system boot loader.
      4 #
      5 
      6 # The /boot/vmlinuz softlink points to the last installed kernel.
      7 KERNEL_VERSION="$(realpath /boot/vmlinuz | sed 's/.*\/.*-\(.*\)/\1/')"
      8 if [ "$1" ]; then
      9   KERNEL_VERSION="$(realpath "$1" | sed 's/.*\/.*-\(.*\)/\1/')"
     10 fi
     11 
     12 if [ -z "$KERNEL_VERSION" ]; then
     13   >&2 echo "The kernel version could not be detected from the filename."
     14   exit 1
     15 fi
     16 
     17 echo "Installing kernel version $KERNEL_VERSION into the efi..."
     18 cp -H /boot/vmlinuz /efi/EFI/Slackware/vmlinuz
     19 if [ -f /etc/mkinitrd.conf ]; then
     20   echo "Installing initialized ram disk into the efi..."
     21   mkinitrd -F -k "$KERNEL_VERSION" >/dev/null 
     22 fi