]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/clear/ventoy-hook.sh
update README.md
[Ventoy.git] / IMG / cpio / ventoy / hook / clear / ventoy-hook.sh
index a73b70276eacaa19d2815efc9a0ec485fb73e46f..d29eddfcd847a4beb98e4107ad7325c68d4b7a9b 100644 (file)
 
 . $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