X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/05a1b863a66bf72b26e5d87570c4e0e61b9736cd..261ddcef45ede2f9440342a5b3dd474e26df1679:/IMG/cpio/ventoy/hook/kaos/ventoy-hook.sh diff --git a/IMG/cpio/ventoy/hook/kaos/ventoy-hook.sh b/IMG/cpio/ventoy/hook/kaos/ventoy-hook.sh index c268801..84aadc0 100644 --- a/IMG/cpio/ventoy/hook/kaos/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/kaos/ventoy-hook.sh @@ -2,5 +2,14 @@ . $VTOY_PATH/hook/ventoy-os-lib.sh -ventoy_systemd_udevd_work_around -ventoy_add_udev_rule "$VTOY_PATH/hook/kaos/udev_disk_hook.sh %k" +if $GREP -q '^"$mount_handler"' /init; then + echo 'use mount_handler1 ...' >> $VTLOG + $SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/kaos/ventoy-disk.sh" -i /init +elif $GREP -q '^$mount_handler' /init; then + echo 'use mount_handler2 ...' >> $VTLOG + $SED "/^\$mount_handler/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/kaos/ventoy-disk.sh" -i /init +fi + +if [ -f $VTOY_PATH/ventoy_persistent_map ]; then + $SED "1 aexport cow_label=vtoycow" -i /init +fi