Testing for dual boot setup
This commit is contained in:
parent
0e51c6ce6a
commit
9bc3c70c5a
@ -198,13 +198,15 @@ install_bootloader() {
|
||||
|
||||
if [[ $SYS == 'UEFI' ]]; then
|
||||
# make sure efivarfs has been mounted
|
||||
mount -o remount,rw -t efivarfs efivarfs /sys/firmware/efi/efivars >/dev/null 2>&1
|
||||
BCMDS[$BOOTLDR]="mount -o remount,rw -t efivarfs efivarfs /sys/firmware/efi/efivars; ${BCMDS[$BOOTLDR]}"
|
||||
mount -o remount,rw -t efivarfs efivarfs $EFI >/dev/null 2>&1
|
||||
BCMDS[$BOOTLDR]="mount -o remount,rw -t efivarfs efivarfs $EFI; ${BCMDS[$BOOTLDR]}"
|
||||
|
||||
# remove old boot entries
|
||||
local esp="$MNT/boot/efi/EFI/"
|
||||
[[ ! -d $MNT/boot/efi/EFI && -d $MNT/boot/EFI ]] && esp="$MNT/boot/EFI/"
|
||||
find $esp -maxdepth 1 -mindepth 1 \( -name '[aA][rR][cC][hH][lL]abs' -o -name '[Bb][oO][oO][tT]' \) -type d -exec rm -rf '{}' \; >/dev/null 2>&1
|
||||
find $esp -maxdepth 1 -mindepth 1 \
|
||||
\( -name '[aA][rR][cC][hH][lL]abs' -o -name '[Bb][oO][oO][tT]' \) \
|
||||
-type d -exec rm -rf '{}' \; >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# sets up the bootloader config(s) and ${BCMDS[$BOOTLDR]}
|
||||
|
Reference in New Issue
Block a user