- echo "An existing EFI boot manager entry for rEFInd seems to exist:"
- echo
- echo "$ExistingEntry"
- echo
- echo "This entry is NOT being modified, and no new entry is being created."
+ ExistingEntryBootNum=`echo $ExistingEntry | cut -c 5-8`
+ FirstBoot=`$Efibootmgr | grep BootOrder | cut -c 12-15`
+ if [[ $ExistingEntryBootNum != $FirstBoot ]] ; then
+ echo "An existing rEFInd boot entry exists, but isn't set as the default boot"
+ echo "manager. The boot order is being adjusted to make rEFInd the default boot"
+ echo "manager. If this is NOT what you want, you should use efibootmgr to"
+ echo "manually adjust your EFI's boot order."
+ $Efibootmgr -b $ExistingEntryBootNum -B &> /dev/null
+ InstallIt="1"
+ fi