X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/096cc99c3c0467be99781aa61f9fc46e0000dbaf..4df793e0217183e20045d5d06058e4c6ebf8a32f:/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 +}