From c6b7fdfc8f1e6f8c83b1b8274f67d10a6f6a2c64 Mon Sep 17 00:00:00 2001 From: Vince Date: Sun, 26 Sep 2021 21:38:42 +0800 Subject: [PATCH] Update install.sh --- install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d43936a..33cb041 100755 --- a/install.sh +++ b/install.sh @@ -307,7 +307,13 @@ updating_grub() { elif has_command zypper; then grub2-mkconfig -o /boot/grub2/grub.cfg elif has_command dnf; then - grub2-mkconfig -o /boot/grub2/grub.cfg || grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg + if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then + prompt -i "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n" + grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg + elif [[ -f /boot/grub2/grub.cfg ]]; then + prompt -i "Find config file on /boot/grub2/grub.cfg ...\n" + grub2-mkconfig -o /boot/grub2/grub.cfg + fi fi # Success message