]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/debian/puppy-hook.sh
support for 360Udisk
[Ventoy.git] / IMG / cpio / ventoy / hook / debian / puppy-hook.sh
index 69e18f3d0ca16a9765505e20e71e340c790e522d..037c77adb6ea4a5fd729f7e589d701ee60a32855 100644 (file)
 # 
 #************************************************************************************
 
-$SED '1 apmedia=usbhd'  -i /init
-$SED "/^ *HAVE_PARTS=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/puppy-disk.sh"  -i /init
-$SED "/^ *HAVE_PARTS=/a\ HAVE_PARTS='mapper/ventoy|iso9660'"  -i /init
+if $GREP -q '^ *HAVE_PARTS=' /init; then
+    $SED '1 apmedia=usbhd'  -i /init
+    $SED "/^ *HAVE_PARTS=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/puppy-disk.sh"  -i /init
+    $SED "/^ *HAVE_PARTS=/a\ HAVE_PARTS='ventoy|iso9660'"  -i /init
+fi
+
+#360UDisk
+if [ -e /360anim ]; then    
+    $BUSYBOX_PATH/touch /puppy.sfs 
+    $SED "/if *.*flag-usb-ready/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/360-disk.sh"  -i /init
+    $SED "/^exec *switch_root/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/360-switch-root.sh"  -i /init    
+fi
+
+if [ -f /DISTRO_SPECS ]; then
+    if ! [ -d /dev ]; then
+        $BUSYBOX_PATH/mkdir /dev
+    fi
+fi