add option to install grub or not
This commit is contained in:
parent
dee731352d
commit
e186d9bb47
|
|
@ -155,6 +155,7 @@ echo "
|
||||||
Generated /etc/fstab:
|
Generated /etc/fstab:
|
||||||
"
|
"
|
||||||
cat /mnt/etc/fstab
|
cat /mnt/etc/fstab
|
||||||
|
if [${GRUB_INSTALL} == "yes"]; then
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
GRUB BIOS Bootloader Install & Check
|
GRUB BIOS Bootloader Install & Check
|
||||||
|
|
@ -165,6 +166,7 @@ if [[ ! -d "/sys/firmware/efi" ]]; then
|
||||||
else
|
else
|
||||||
pacstrap /mnt efibootmgr --noconfirm --needed
|
pacstrap /mnt efibootmgr --noconfirm --needed
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Checking for low memory systems <8G
|
Checking for low memory systems <8G
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ fi
|
||||||
# set kernel parameter for adding splash screen
|
# set kernel parameter for adding splash screen
|
||||||
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub
|
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub
|
||||||
|
|
||||||
echo -e "Installing CyberRe Grub theme..."
|
|
||||||
if [ "$GRUB_THEME" == "cyberRE"]; then
|
if [ "$GRUB_THEME" == "cyberRE"]; then
|
||||||
|
echo -e "Installing CyberRe Grub theme..."
|
||||||
THEME_DIR="/boot/grub/themes"
|
THEME_DIR="/boot/grub/themes"
|
||||||
THEME_NAME=CyberRe
|
THEME_NAME=CyberRe
|
||||||
echo -e "Creating the theme directory..."
|
echo -e "Creating the theme directory..."
|
||||||
|
|
@ -49,9 +49,11 @@ if [ "$GRUB_THEME" == "cyberRE"]; then
|
||||||
echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >> /etc/default/grub
|
echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >> /etc/default/grub
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$GRUB_INSTALL" == "yes"]; then
|
||||||
echo -e "Updating grub..."
|
echo -e "Updating grub..."
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
echo -e "All set!"
|
echo -e "All set!"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -287,15 +287,28 @@ read -rep "Please enter your hostname: " nameofmachine
|
||||||
set_option NAME_OF_MACHINE $nameofmachine
|
set_option NAME_OF_MACHINE $nameofmachine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# === install grub or not ===
|
||||||
|
grubInstall () {
|
||||||
|
echo -ne "Install grub?:\n"
|
||||||
|
options=(yes no)
|
||||||
|
select_option $? 4 "${options[@]}"
|
||||||
|
grub_install=${options[$?]}
|
||||||
|
set_option GRUB_INSTALL $grub_install
|
||||||
|
}
|
||||||
|
|
||||||
# === select grub theme ===
|
# === select grub theme ===
|
||||||
grubTheme () {
|
grubTheme () {
|
||||||
clear
|
clear
|
||||||
logo
|
logo
|
||||||
|
grub_install
|
||||||
|
if ["$GRUB_INSTALL" == "yes"]; then
|
||||||
echo -ne "Select your grub theme:\n"
|
echo -ne "Select your grub theme:\n"
|
||||||
options=(cyberRE none)
|
options=(cyberRE none)
|
||||||
select_option $? 4 "${options[@]}"
|
select_option $? 4 "${options[@]}"
|
||||||
grub_theme=${options[$?]}
|
grub_theme=${options[$?]}
|
||||||
set_option GRUB_THEME $grub_theme
|
set_option GRUB_THEME $grub_theme
|
||||||
|
else
|
||||||
|
set_option GRUB_THEME none
|
||||||
}
|
}
|
||||||
|
|
||||||
# === Let the user choose AUR helper from predefined list ===
|
# === Let the user choose AUR helper from predefined list ===
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue