Newer
Older
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
#BOOT_DIR_ABS="$3"
#KERNEL_IMAGE="$4"
INITRD="/boot/initramfs-$KERNEL_VERSION.img"
INITRD_FALLBACK="/boot/initramfs-$KERNEL_VERSION-fallback.img"
case $COMMAND in
add)
mkinitcpio -g "$INITRD" -k "$KERNEL_VERSION"
#mkinitcpio -g "$INITRD_FALLBACK" -k "$KERNEL_VERSION" -S autodetect
;;
remove)
rm -f "$INITRD"
rm -f "$INITRD_FALLBACK"
;;
esac
exit 0