2013-05-14 13:29:45 +00:00
|
|
|
#!/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')
|
2013-07-16 16:52:21 +00:00
|
|
|
# By default the F19 cloud image is using extlinux to boot the image
|
2013-09-16 19:18:49 +00:00
|
|
|
if [ -f /boot/grub2/grub.cfg ]; then
|
2013-09-17 18:08:04 +00:00
|
|
|
echo 'GRUB_CMDLINE_LINUX="nomodeset vga=normal"' >/etc/default/grub
|
2013-09-16 19:18:49 +00:00
|
|
|
sed -i -e 's/terminal_output gfxterm/terminal_output console/' /boot/grub2/grub.cfg
|
|
|
|
fi
|
2013-05-14 13:29:45 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo 'GRUB_TERMINAL=console' >>/etc/default/grub
|
|
|
|
|