From: longpanda Date: Mon, 27 Jun 2022 14:19:11 +0000 (+0800) Subject: Fix the bug when booting latest KaOS. (#1696) X-Git-Tag: v1.0.78~3 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/aecc579fcce4d9db04775c7b2b20b0f70954dbd3 Fix the bug when booting latest KaOS. (#1696) --- diff --git a/IMG/cpio/ventoy/hook/kaos/ventoy-disk.sh b/IMG/cpio/ventoy/hook/kaos/ventoy-disk.sh index c21c04c..42569cc 100644 --- a/IMG/cpio/ventoy/hook/kaos/ventoy-disk.sh +++ b/IMG/cpio/ventoy/hook/kaos/ventoy-disk.sh @@ -49,9 +49,10 @@ ventoy_os_install_dmsetup_by_fuse() { insmod $KoName fi - umount $VTOY_PATH/mnt/squashfs - umount $VTOY_PATH/mnt/iso - umount $VTOY_PATH/mnt/fuse + ventoy_check_umount $VTOY_PATH/mnt/squashfs + ventoy_check_umount $VTOY_PATH/mnt/iso + ventoy_check_umount $VTOY_PATH/mnt/fuse + vtlog "umount done" } diff --git a/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh b/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh index db33eec..7f24c42 100644 --- a/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh +++ b/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh @@ -868,3 +868,14 @@ ventoy_check_install_module_xz() { $BUSYBOX_PATH/insmod "$1" fi } + +ventoy_check_umount() { + for vtLoop in 0 1 2 3 4 5 6 7 8 9; do + $BUSYBOX_PATH/umount "$1" > /dev/null 2>&1 + if $BUSYBOX_PATH/mountpoint -q "$1"; then + $SLEEP 1 + else + break + fi + done +}