X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/d5b829f8e8c8367b032b4bb57a8fc37701d42e17..2991f097fb98cfaf1a0ebd5048fc0e8bc08aa20d:/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh?ds=inline diff --git a/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh b/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh index a73b702..3d7e2b5 100644 --- a/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/clear/ventoy-hook.sh @@ -19,4 +19,13 @@ . $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 + +#issue 1674 +$SED "/switch_root/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/clear/hidden-hook.sh" -i /init