diff --git a/bin/make_images/linux_install_files/custom/rootfs/root/installer.sh b/bin/make_images/linux_install_files/custom/rootfs/root/installer.sh index 1f96b31..781112d 100755 --- a/bin/make_images/linux_install_files/custom/rootfs/root/installer.sh +++ b/bin/make_images/linux_install_files/custom/rootfs/root/installer.sh @@ -28,6 +28,7 @@ source "./linux_install/lib/msg/${LANG_INSTALLER:-en}.sh" # These functions are designed for using not only in installer, but in automatic profiles. function do_end_action() { + umount_partitions case $1 in 0) msg_print note "Rebooting..."; reboot;; 1) msg_print note "Powering off..."; poweroff;; diff --git a/lib/common/lib_sys.sh b/lib/common/lib_sys.sh index b1b7624..c1ef272 100644 --- a/lib/common/lib_sys.sh +++ b/lib/common/lib_sys.sh @@ -145,7 +145,7 @@ export -f format_and_mount function umount_partitions() { local bootloader_type="${1:-BOOTLOADER_TYPE_DEFAULT}" mount_dir=${2:-/mnt/mnt} - [[ $bootloader_type == "uefi" ]] && umount "$mount_dir/boot" - umount "$mount_dir" + [[ $bootloader_type == "uefi" ]] && try_exec 0 umount "$mount_dir/boot" + try_exec 0 umount "$mount_dir" } export -f umount_partitions \ No newline at end of file