X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/ad9a031092f1d953d10bcf6ec77cb2fa1fc2c103..261ddcef45ede2f9440342a5b3dd474e26df1679:/IMG/cpio/ventoy/hook/manjaro/ventoy-hook.sh diff --git a/IMG/cpio/ventoy/hook/manjaro/ventoy-hook.sh b/IMG/cpio/ventoy/hook/manjaro/ventoy-hook.sh index ebd828e..f5cdcf5 100644 --- a/IMG/cpio/ventoy/hook/manjaro/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/manjaro/ventoy-hook.sh @@ -28,8 +28,22 @@ else $CAT $VTOY_PATH/hook/default/13-dm-disk.rules > "$DISTRO_UDEV_DIR/13-dm-disk.rules" fi - -if $GREP -q '^mount_setup$' init; then +if $GREP -q '^"$mount_handler"' /init; then + echo 'use mount_handler ...' >> $VTLOG + + vthookfile=/hooks/archiso + + if [ -e /hooks/miso ]; then + vthookfile=/hooks/miso + $SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/manjaro/ventoy-disk.sh \"\$misodevice\"" -i /init + else + $SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/manjaro/ventoy-disk.sh \"\$archisodevice\"" -i /init + fi + + if [ -f $vthookfile ]; then + $SED '/while ! poll_device "${dev}"/a\ if /ventoy/busybox/sh /ventoy/hook/manjaro/ventoy-timeout.sh ${dev}; then break; fi' -i $vthookfile + fi +elif $GREP -q '^mount_setup$' init; then echo "Here use notify ..." >> $VTLOG ventoy_set_inotify_script manjaro/ventoy-inotifyd-hook.sh