X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/d5b829f8e8c8367b032b4bb57a8fc37701d42e17..2283c3e8b0debf84bddc47c27fd79e259eccc8a2:/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh diff --git a/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh b/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh index a73b702..d29eddf 100644 --- a/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh @@ -19,4 +19,10 @@ . $VTOY_PATH/hook/ventoy-os-lib.sh -$SED "/find_and_mount_installer *$/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/clear/disk-hook.sh" -i /init +if $GREP -q find_and_mount_installer /init; then + echo "find_and_mount_installer" >> $VTLOG + $SED "/find_and_mount_installer *$/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/clear/disk-hook.sh" -i /init +else + echo "find_installer" >> $VTLOG + $SED "/\$.*find_installer/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/clear/disk-hook.sh" -i /init +fi