Merge "Remove duplicate GRUB command line entry"
This commit is contained in:
commit
c4c2fb746c
@ -187,24 +187,13 @@ function install_grub2 {
|
|||||||
|
|
||||||
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT}\"" >>/etc/default/grub
|
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT}\"" >>/etc/default/grub
|
||||||
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub
|
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub
|
||||||
|
sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub
|
||||||
|
|
||||||
if type grub2-mkconfig >/dev/null; then
|
if type grub2-mkconfig >/dev/null; then
|
||||||
GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG"
|
GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG"
|
||||||
else
|
else
|
||||||
GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG"
|
GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG"
|
||||||
fi
|
fi
|
||||||
DISTRO_NAME=${DISTRO_NAME:-}
|
|
||||||
case $DISTRO_NAME in
|
|
||||||
'ubuntu'|'debian')
|
|
||||||
sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub
|
|
||||||
GRUB_MKCONFIG=update-grub
|
|
||||||
;;
|
|
||||||
'fedora'|'centos7'|'centos')
|
|
||||||
echo "GRUB_CMDLINE_LINUX=\"${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"" >>/etc/default/grub
|
|
||||||
;;
|
|
||||||
'opensuse')
|
|
||||||
sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# os-prober leaks /dev/sda into config file in dual-boot host
|
# os-prober leaks /dev/sda into config file in dual-boot host
|
||||||
# Disable grub-os-prober to avoid the issue while running
|
# Disable grub-os-prober to avoid the issue while running
|
||||||
|
Loading…
Reference in New Issue
Block a user