From: longpanda Date: Mon, 18 Apr 2022 05:43:38 +0000 (+0800) Subject: Fix the issue when booting Prime OS 2.1.0 (#1580) X-Git-Tag: v1.0.74~14 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/89addae48ff18e49359edf0308b6822b10fb6a0d Fix the issue when booting Prime OS 2.1.0 (#1580) --- diff --git a/IMG/cpio/ventoy/hook/primeos/ventoy-hook.sh b/IMG/cpio/ventoy/hook/primeos/ventoy-hook.sh index 05c3370..8cf543d 100644 --- a/IMG/cpio/ventoy/hook/primeos/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/primeos/ventoy-hook.sh @@ -21,5 +21,12 @@ $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