]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/primeos/ventoy-hook.sh
1.0.95 release
[Ventoy.git] / IMG / cpio / ventoy / hook / primeos / ventoy-hook.sh
index 05c33700ace1e9f6a028bbd8963ca2b47ffc5fa3..8cf543db6391ee2c290598588cee6b054d7de064 100644 (file)
 
 $BUSYBOX_PATH/mkdir /dev
 
-$SED '/Detecting *PrimeOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init
-$SED "/Detecting *PrimeOS/a\ $BUSYBOX_PATH/sh  $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init
+if $GREP -q 'Detecting *PrimeOS' /init; then
+    $SED '/Detecting *PrimeOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init
+    $SED "/Detecting *PrimeOS/a\ $BUSYBOX_PATH/sh  $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init
+elif $GREP -q 'Detecting *PRIMEOS' /init; then
+    $SED '/Detecting *PRIMEOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init
+    $SED "/Detecting *PRIMEOS/a\ $BUSYBOX_PATH/sh  $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init
+else
+    echo "not detecting found" >> $VTLOG
+fi