if [[ $BOOT_DEVICE == "" ]]; then
select_device 'boot' || return 1
fi
- BCMDS[grub]+=" --target=i386-pc $BOOT_DEVICE"
+ BCMDS[grub]+=" --target=i386-pc $BOOT_DEVICE && grub-mkconfig -o /boot/grub/grub.cfg"
else
if [[ $ROOT_PART =~ /dev/mapper && ! $LVM && ! $LUKS_PASS ]]; then
luks_pass "$_LuksOpen" "$ROOT_PART" || return 1
# the mount mess is needed for os-prober to work properly in the chroot
BCMDS[grub]="mkdir -p /run/udev && mkdir -p /run/lvm &&
- mount --bind /hostrun/udev /run/udev && mount --bind /hostrun/lvm /run/lvm &&
- ${BCMDS[grub]} --target=$ttype --efi-directory=${BMNTS[UEFI-grub]} --bootloader-id=$DIST &&
- umount /run/udev && umount /run/lvm"
+ mount --bind /hostrun/udev /run/udev && mount --bind /hostrun/lvm /run/lvm &&
+ ${BCMDS[grub]} --target=$ttype --efi-directory=${BMNTS[UEFI-grub]} --bootloader-id=$DIST &&
+ grub-mkconfig -o /boot/grub/grub.cfg &&
+ umount /run/udev && umount /run/lvm"
fi
return 0
sigint()
{
# used to trap SIGINT and cleanly exit the program
- printf "\n** CTRL-C caught"
+ printf "\nCTRL-C caught\nCleaning up...\n"
die 1
}