Update GRUB_MKCONFIG for detecting what's installed

Gentoo has updated it's grub ebuild to default to the upstream
recommended installation parameter of grub-mkconfig instead of our
default multislot installation of grub2-mkconfig.  Update the command
line parameter so that it works with both.

Change-Id: I359b44338a4f76af7c026f5cad212e6dc3dbf2b3
This commit is contained in:
Matthew Thode 2016-08-22 07:09:57 -05:00
parent c20a42051a
commit c1c2f7147b
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8

View File

@ -137,7 +137,11 @@ function install_grub2 {
echo 'GRUB_GFXPAYLOAD_LINUX=text' >>/etc/default/grub
echo 'GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 no_timer_check"' >>/etc/default/grub
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub
GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG"
if which grub2-mkconfig >/dev/null; then
GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG"
else
GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG"
fi
DISTRO_NAME=${DISTRO_NAME:-}
case $DISTRO_NAME in
'ubuntu'|'debian')