X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/05a1b863a66bf72b26e5d87570c4e0e61b9736cd..a4cfbd67993752d4c9a002e7eead76b6bbd971f3:/IMG/cpio/ventoy/hook/debian/antix-hook.sh diff --git a/IMG/cpio/ventoy/hook/debian/antix-hook.sh b/IMG/cpio/ventoy/hook/debian/antix-hook.sh index 6661504..64ad6ee 100644 --- a/IMG/cpio/ventoy/hook/debian/antix-hook.sh +++ b/IMG/cpio/ventoy/hook/debian/antix-hook.sh @@ -23,7 +23,16 @@ elif $GREP -q '\[ "$FILTERED_LIST" \]' /init; then $SED '/\[ "$FILTERED_LIST" \]/i\ FILTERED_LIST="/dev/mapper/ventoy $FILTERED_LIST"' -i /init fi -$SED -i "/_search_for_boot_device_/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/antix-disk.sh" /init +if $GREP -q '_search_for_boot_device_' /init; then + $SED -i "/_search_for_boot_device_/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/antix-disk.sh" /init +elif $GREP -q 'FILTERED_LIST=.*ventoy' /init; then + $SED -i "/FILTERED_LIST=.*ventoy/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/antix-disk.sh" /init +fi + + +if [ -f $VTOY_PATH/ventoy_persistent_map ]; then + $SED 's#for param in $cmdline#for param in persist_all $cmdline#g' -i /init +fi # for debug #$SED -i "/^linuxfs_error/a\exec $VTOY_PATH/busybox/sh" /init