mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
🚧 restrict bootloader selection
This commit is contained in:
1 file changed
+18
-1
@@ -37,18 +37,33 @@ Main() {
|
|||||||
esac
|
esac
|
||||||
mode=online # keep this line for now!
|
mode=online # keep this line for now!
|
||||||
|
|
||||||
local _exitcode=$(yad --width 300 --title "Bootloader" \
|
local _efi_check_dir="/sys/firmware/efi"
|
||||||
|
local _exitcode=2 # by default use grub
|
||||||
|
|
||||||
|
local SYSTEM=""
|
||||||
|
local BOOTLOADER=""
|
||||||
|
if [ -d "${_efi_check_dir}" ]; then
|
||||||
|
SYSTEM="UEFI SYSTEM"
|
||||||
|
|
||||||
|
# Restrict bootloader selection to only UEFI systems
|
||||||
|
_exitcode=$(yad --width 300 --title "Bootloader" \
|
||||||
--image=gnome-shutdown \
|
--image=gnome-shutdown \
|
||||||
--button="Grub:2" \
|
--button="Grub:2" \
|
||||||
--button="Systemd-boot:3" \
|
--button="Systemd-boot:3" \
|
||||||
--text "Choose Bootloader:" ; echo $?)
|
--text "Choose Bootloader:" ; echo $?)
|
||||||
|
else
|
||||||
|
SYSTEM="BIOS/MBR SYSTEM"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ "${_exitcode}" -eq 2 ]]; then
|
if [[ "${_exitcode}" -eq 2 ]]; then
|
||||||
|
BOOTLOADER="GRUB"
|
||||||
echo "USING GRUB!"
|
echo "USING GRUB!"
|
||||||
yes | sudo pacman -R cachyos-calamares-systemd cachyos-calamares-systemd-config
|
yes | sudo pacman -R cachyos-calamares-systemd cachyos-calamares-systemd-config
|
||||||
yes | sudo pacman -R cachyos-calamares cachyos-calamares-config
|
yes | sudo pacman -R cachyos-calamares cachyos-calamares-config
|
||||||
yes | sudo pacman -Sy cachyos-calamares cachyos-calamares-config
|
yes | sudo pacman -Sy cachyos-calamares cachyos-calamares-config
|
||||||
elif [[ "${_exitcode}" -eq 3 ]]; then
|
elif [[ "${_exitcode}" -eq 3 ]]; then
|
||||||
|
BOOTLOADER="SYSTEMD-BOOT"
|
||||||
echo "USING SYSTEMD-BOOT!"
|
echo "USING SYSTEMD-BOOT!"
|
||||||
yes | sudo pacman -R cachyos-calamares cachyos-calamares-config
|
yes | sudo pacman -R cachyos-calamares cachyos-calamares-config
|
||||||
yes | sudo pacman -Sy cachyos-calamares-systemd cachyos-calamares-systemd-config
|
yes | sudo pacman -Sy cachyos-calamares-systemd cachyos-calamares-systemd-config
|
||||||
@@ -60,6 +75,8 @@ Main() {
|
|||||||
########## $log by $progname
|
########## $log by $progname
|
||||||
########## Started (UTC): $(date -u "+%x %X")
|
########## Started (UTC): $(date -u "+%x %X")
|
||||||
########## Install mode: $mode
|
########## Install mode: $mode
|
||||||
|
########## System: $SYSTEM
|
||||||
|
########## Bootloader: $BOOTLOADER
|
||||||
EOF
|
EOF
|
||||||
FollowFile "$log" "Install log" 20 20
|
FollowFile "$log" "Install log" 20 20
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user