F19 GRUB configuration file

In the 51-grub hook, after the GRUB installation, the script will look
for a GRUB configuration file and in case it's not present one will
be generated using the grub-mkconfig command. The reason why it have
to be done is because the new Fedora 19 cloud images is using extlinux
by default.

Change-Id: I80b15b3122698d98ac4d47dc06faf5909a90ab00
This commit is contained in:
Lucas Alvares Gomes 2013-07-12 17:15:08 +01:00
parent 82eacdec2f
commit 6f8b8f07b2
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,17 @@ if [ -f "/boot/grub/grub.cfg" ] ; then
elif [ -f "/boot/grub2/grub.cfg" ] ; then elif [ -f "/boot/grub2/grub.cfg" ] ; then
GRUB_CFG=/boot/grub2/grub.cfg GRUB_CFG=/boot/grub2/grub.cfg
fi fi
# If GRUB configuration file does not exist, generate one
if [ ! $GRUB_CFG ]; then
if [ -d /boot/grub2 ]; then
GRUB_CFG=/boot/grub2/grub.cfg
elif [ -d /boot/grub ]; then
GRUB_CFG=/boot/grub/grub.cfg
fi
grub2-mkconfig -o $GRUB_CFG
fi;
DIST=`lsb_release -is` DIST=`lsb_release -is`
[ -n "$DIST" ] [ -n "$DIST" ]
RELEASE=`lsb_release -cs` RELEASE=`lsb_release -cs`