Skip to content

Commit

Permalink
Merge pull request #10 from gesangtome/master
Browse files Browse the repository at this point in the history
EFI support for Fedora/CentOS/RH/SUSE
  • Loading branch information
shvchk committed Sep 4, 2020
2 parents d7aeeef + 59c2661 commit 43f4883
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ done < /dev/tty
GRUB_DIR='grub'
UPDATE_GRUB=''

# Detect bootloader
if [ -d "/boot/efi" ]; then
echo "The current bootloader is UEFI"
UEFI_MODE=YES
fi

if [ -e /etc/os-release ]; then

source /etc/os-release
Expand All @@ -59,7 +65,11 @@ if [ -e /etc/os-release ]; then
"$ID_LIKE" =~ (fedora|rhel|suse) ]]; then

GRUB_DIR='grub2'
UPDATE_GRUB='grub2-mkconfig -o /boot/grub2/grub.cfg'
if [ "$UEFI_MODE" == "YES" ]; then
UPDATE_GRUB="grub2-mkconfig -o /boot/efi/EFI/$ID/grub.cfg"
else
UPDATE_GRUB='grub2-mkconfig -o /boot/grub2/grub.cfg'
fi
fi
fi

Expand Down

0 comments on commit 43f4883

Please sign in to comment.