X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/096cc99c3c0467be99781aa61f9fc46e0000dbaf..028663de9aa7ff738b042c91257707aba2e4b6b2:/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh diff --git a/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh b/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh index f6d9cb0..b367895 100644 --- a/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh +++ b/IMG/cpio/ventoy/hook/ventoy-hook-lib.sh @@ -892,3 +892,17 @@ ventoy_check_umount() { fi done } + +ventoy_wait_dir() { + vtdir=$1 + vtsec=0 + + while [ $vtsec -lt $2 ]; do + if [ -d "$vtdir" ]; then + break + else + $SLEEP 1 + vtsec=$(expr $vtsec + 1) + fi + done +}