Browse Source

Fixes #120 - Add grub.cfg path for RedHat on UEFI

Brent Yang 2 years ago
parent
commit
7844eb5a37
1 changed files with 1 additions and 0 deletions
  1. 1 0
      debi.sh

+ 1 - 0
debi.sh

@@ -915,6 +915,7 @@ EOF
         # shellcheck disable=SC2016
         # shellcheck disable=SC2016
         echo 'zz_debi=/etc/default/grub.d/zz-debi.cfg; if [ -f "$zz_debi" ]; then . "$zz_debi"; fi' >> /etc/default/grub
         echo 'zz_debi=/etc/default/grub.d/zz-debi.cfg; if [ -f "$zz_debi" ]; then . "$zz_debi"; fi' >> /etc/default/grub
         grub_cfg=/boot/grub2/grub.cfg
         grub_cfg=/boot/grub2/grub.cfg
+        [ -d /sys/firmware/efi ] && grub_cfg=/boot/efi/EFI/*/grub.cfg
         grub2-mkconfig -o "$grub_cfg"
         grub2-mkconfig -o "$grub_cfg"
     elif command_exists grub-mkconfig; then
     elif command_exists grub-mkconfig; then
         tmp=$(mktemp)
         tmp=$(mktemp)