]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/debian/default-hook.sh
1.0.72 release
[Ventoy.git] / IMG / cpio / ventoy / hook / debian / default-hook.sh
index e9873d82cb69686ce4df4204dbe8020da6ad9958..37f5a9ed6f9ae03f468bf116da4db01d1e73a69f 100644 (file)
@@ -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
 
@@ -72,5 +79,8 @@ if [ -f /mod.img ] && [ -f /mod/fs/cramfs.ko ]; then
     $BUSYBOX_PATH/rmmod cramfs
 fi
 
-
+#for siduction-patience-nox-
+if [ -f /scripts/fll ]; then
+    $SED  "/unset FINGERED/a\\echo '/dev/mapper/ventoy';return;"  -i /scripts/fll
+fi