X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/e8d17f9bb1070fe612f7fffc1f2b020f07e06a1c..ed1aa3d5be7daa8ffd0b3d050609cd9eab492e79:/IMG/cpio/ventoy/hook/debian/default-hook.sh diff --git a/IMG/cpio/ventoy/hook/debian/default-hook.sh b/IMG/cpio/ventoy/hook/debian/default-hook.sh index 4b52832..37f5a9e 100644 --- a/IMG/cpio/ventoy/hook/debian/default-hook.sh +++ b/IMG/cpio/ventoy/hook/debian/default-hook.sh @@ -54,8 +54,15 @@ fi if [ -f $VTOY_PATH/autoinstall ]; then echo "Do auto install ..." >> $VTLOG - if $GREP -q "^mount /proc$" /init; then - $SED "/^mount \/proc/a export file=$VTOY_PATH/autoinstall; export auto='true'; export priority='critical'" -i /init + if $GREP -q '^autoinstall:' $VTOY_PATH/autoinstall; then + echo "cloud-init auto install ..." >> $VTLOG + if $GREP -q "maybe_break init" /init; then + $SED "/maybe_break init/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/ventoy-cloud-init.sh \$rootmnt" -i /init + fi + else + if $GREP -q "^mount /proc$" /init; then + $SED "/^mount \/proc/a export file=$VTOY_PATH/autoinstall; export auto='true'; export priority='critical'" -i /init + fi fi fi