X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/c8b2cca7c2668c68bdbb0551402abdff99e7f43e..261ddcef45ede2f9440342a5b3dd474e26df1679:/IMG/cpio/ventoy/hook/austrumi/disk_hook.sh?ds=inline diff --git a/IMG/cpio/ventoy/hook/austrumi/disk_hook.sh b/IMG/cpio/ventoy/hook/austrumi/disk_hook.sh index 210eaf0..431ccd5 100644 --- a/IMG/cpio/ventoy/hook/austrumi/disk_hook.sh +++ b/IMG/cpio/ventoy/hook/austrumi/disk_hook.sh @@ -21,8 +21,6 @@ VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH -wait_for_usb_disk_ready - vtdiskname=$(get_ventoy_disk_name) if [ "$vtdiskname" = "unknown" ]; then vtlog "ventoy disk not found" @@ -30,6 +28,14 @@ if [ "$vtdiskname" = "unknown" ]; then exit 0 fi +if check_usb_disk_ready "$vtdiskname"; then + vtlog "check_usb_disk_ready ok" +else + vtlog "check_usb_disk_ready error" + PATH=$VTPATH_OLD + exit 0 +fi + ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" # blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')