fb33adc5ba
Create a single check for grub2 so we skip these steps on F19. Change-Id: I5f05adcf409be5c2532478439bcb55ab397da20e
25 lines
606 B
Bash
Executable File
25 lines
606 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# If lsb_release is missing, just do nothing.
|
|
DISTRO=`lsb_release -si` || true
|
|
|
|
GRUBFILE=""
|
|
|
|
case $DISTRO in
|
|
'Ubuntu'|'Debian')
|
|
sed -i -e 's/\(^GRUB_CMDLINE_LINUX.*\)"$/\1 nomodeset vga=normal"/' /etc/default/grub
|
|
;;
|
|
'Fedora')
|
|
# By default the F19 cloud image is using extlinux to boot the image
|
|
if [ -f /boot/grub2/grub.cfg ]; then
|
|
echo 'GRUB_CMDLINE_LINUX="nomodeset vga=normal"' >/etc/default/grub
|
|
sed -i -e 's/terminal_output gfxterm/terminal_output console/' /boot/grub2/grub.cfg
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
echo 'GRUB_TERMINAL=console' >>/etc/default/grub
|
|
|