Correct RHEL grub buggy behavior when detected on EFI installs

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13751 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-09-10 20:47:52 +00:00
parent 7cf628060e
commit 842cb67bd6

View File

@ -34,3 +34,9 @@ fi
export HOSTNAME=$(host $IP 2>/dev/null | awk '{print $5}' | awk -F. '{print $1}')
hostname $HOSTNAME
if [ -f /boot/efi/efi/redhat/grub.conf ]; then #RedHat bug, grub.efi corrupts console unless we are careful...
sed -i s/^terminal.*// /boot/efi/efi/redhat/grub.conf
bootpart=$(sed -e 's/#.*//' /boot/efi/efi/redhat/grub.conf |grep root|grep -v kernel|head -n 1|awk '{print $2}')
bootpart="${bootpart%\\n}"
sed -i s!^serial.*!splashimage=$bootpart/boot/grub/splash.xpm.gz! /boot/efi/efi/redhat/grub.conf
fi