void-packages/srcpkgs/grub/files/kernel.d/grub.post

17 lines
286 B
Bash

#!/bin/sh
#
# Kernel hook for GRUB 2.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
if command -v grub-mkconfig >/dev/null 2>&1; then
if [ -d $ROOTDIR/boot/grub ]; then
grub-mkconfig -o $ROOTDIR/boot/grub/grub.cfg
exit $?
fi
fi
exit 0