mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-12-25 19:25:34 +01:00
Merge pull request #216 from OneRandom1509/master
fix: fixed grub.cfg directory issues in install.sh for fedora
This commit is contained in:
commit
704cef3017
21
install.sh
21
install.sh
@ -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
|
||||||
@ -162,14 +160,6 @@ install() {
|
|||||||
#Append GRUB_FONT
|
#Append GRUB_FONT
|
||||||
echo "GRUB_FONT=/boot/grub2/fonts/unicode.pf2" >> /etc/default/grub
|
echo "GRUB_FONT=/boot/grub2/fonts/unicode.pf2" >> /etc/default/grub
|
||||||
fi
|
fi
|
||||||
elif [[ -f "/boot/efi/EFI/fedora/fonts/unicode.pf2" ]]; then
|
|
||||||
if grep "GRUB_FONT=" /etc/default/grub 2>&1 >/dev/null; then
|
|
||||||
#Replace GRUB_FONT
|
|
||||||
sed -i "s|.*GRUB_FONT=.*|GRUB_FONT=/boot/efi/EFI/fedora/fonts/unicode.pf2|" /etc/default/grub
|
|
||||||
else
|
|
||||||
#Append GRUB_FONT
|
|
||||||
echo "GRUB_FONT=/boot/efi/EFI/fedora/fonts/unicode.pf2" >> /etc/default/grub
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -357,12 +347,7 @@ 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
|
#Check for BIOS
|
||||||
if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then
|
|
||||||
prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n"
|
|
||||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
|
||||||
fi
|
|
||||||
# Check for Bios
|
|
||||||
if [[ -f /boot/grub2/grub.cfg ]]; then
|
if [[ -f /boot/grub2/grub.cfg ]]; then
|
||||||
prompt -s "Find config file on /boot/grub2/grub.cfg ...\n"
|
prompt -s "Find config file on /boot/grub2/grub.cfg ...\n"
|
||||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user