mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2026-03-07 11:14:01 +08:00
Compare commits
5 Commits
4c7bba04ac
...
8d2f2e17b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d2f2e17b8 | ||
|
|
c991e3a3a7 | ||
|
|
bf840ebdb7 | ||
|
|
1358b497d9 | ||
|
|
8383f6b4f8 |
28
install.sh
28
install.sh
@@ -136,17 +136,17 @@ install() {
|
||||
prompt -i "\n Setting ${theme} as default..."
|
||||
|
||||
# Backup grub config
|
||||
if [[ -f /etc/default/grub.bak ]]; then
|
||||
echo -ne "\n${b_CWAR}File '/etc/default/grub.bak' already exists. Remove it? [yN]${CDEF}"
|
||||
read choice
|
||||
if [ "$choice" = 'y' ]; then
|
||||
cp -a /etc/default/grub /etc/default/grub.bak
|
||||
else
|
||||
echo -ne "\n${b_CWAR}Skipping to save a backup configuration in '/etc/default/grub.bak'${CDEF}"
|
||||
fi
|
||||
else
|
||||
cp -a /etc/default/grub /etc/default/grub.bak
|
||||
fi
|
||||
if [[ -f /etc/default/grub.bak ]]; then
|
||||
prompt -w "\n File '/etc/default/grub.bak' already exists!"
|
||||
# read choice
|
||||
# if [[ "$choice" = 'y' ]]; then
|
||||
# cp -a /etc/default/grub /etc/default/grub.bak
|
||||
# else
|
||||
# prompt -s "Skipping to save a backup configuration in '/etc/default/grub.bak'"
|
||||
# fi
|
||||
else
|
||||
cp -an /etc/default/grub /etc/default/grub.bak
|
||||
fi
|
||||
|
||||
# Fedora workaround to fix the missing unicode.pf2 file (tested on fedora 34): https://bugzilla.redhat.com/show_bug.cgi?id=1739762
|
||||
# This occurs when we add a theme on grub2 with Fedora.
|
||||
@@ -219,7 +219,7 @@ install() {
|
||||
# Update grub config
|
||||
prompt -i "\n Updating grub config... \n"
|
||||
updating_grub
|
||||
prompt -w "\n * At the next restart of your computer you will see your new Grub theme: '$theme' "
|
||||
prompt -w "\n * At the next restart of your computer you will see your new Grub theme: '$theme' \n"
|
||||
|
||||
#Check if password is cached (if cache timestamp has not expired yet)
|
||||
elif sudo -n true 2> /dev/null && echo; then
|
||||
@@ -345,11 +345,11 @@ updating_grub() {
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
elif has_command dnf; then
|
||||
if [[ -f /boot/efi/EFI/fedora/grub.cfg ]] && (( $(cat /etc/fedora-release | awk '{print $3}') < 34 )); then
|
||||
prompt -i "\n Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n"
|
||||
prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n"
|
||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
fi
|
||||
if [[ -f /boot/grub2/grub.cfg ]]; then
|
||||
prompt -i "\n 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
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user