fix: removed UEFI grub config file for fedora

This commit is contained in:
OneRandom1509 2024-03-12 13:10:19 +05:30
parent eda1b86dd8
commit 3fa5e0f312

View File

@ -77,12 +77,10 @@ EOF
generate() { generate() {
if [[ "${install_boot}" == 'true' ]]; then if [[ "${install_boot}" == 'true' ]]; then
if [[ -d "/boot/efi/EFI/fedora" ]]; then
THEME_DIR='/boot/efi/EFI/fedora/themes'
fi
if [[ -d "/boot/grub" ]]; then if [[ -d "/boot/grub" ]]; then
THEME_DIR='/boot/grub/themes' THEME_DIR='/boot/grub/themes'
elif [[ -d "/boot/grub2" ]]; then fi
if [[ -d "/boot/grub2" ]]; then
THEME_DIR='/boot/grub2/themes' THEME_DIR='/boot/grub2/themes'
fi fi
fi fi
@ -357,10 +355,10 @@ updating_grub() {
grub2-mkconfig -o /boot/grub2/grub.cfg grub2-mkconfig -o /boot/grub2/grub.cfg
# Check for Fedora (regular or Atomic) # Check for Fedora (regular or Atomic)
elif has_command dnf || has_command rpm-ostree; then elif has_command dnf || has_command rpm-ostree; then
# check for UEFI # DON'T TOUCH UEFI
if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then
prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n" prompt -s "Find config file on /etc/grub2.cfg ...\n"
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg grub2-mkconfig -o /etc/grub2.cfg
fi fi
# Check for Bios # Check for Bios
if [[ -f /boot/grub2/grub.cfg ]]; then if [[ -f /boot/grub2/grub.cfg ]]; then