From 44b38dce74f3b28bab2ae6d48d04aa17117e0695 Mon Sep 17 00:00:00 2001 From: longpanda Date: Tue, 22 Mar 2022 17:52:56 +0800 Subject: [PATCH] Add support for venomlinux (#1526) --- IMG/cpio/ventoy/hook/arch/ventoy-hook.sh | 5 ++++- IMG/cpio/ventoy/ventoy_chain.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/IMG/cpio/ventoy/hook/arch/ventoy-hook.sh b/IMG/cpio/ventoy/hook/arch/ventoy-hook.sh index 1dde3053..5428e5e0 100644 --- a/IMG/cpio/ventoy/hook/arch/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/arch/ventoy-hook.sh @@ -20,7 +20,7 @@ . $VTOY_PATH/hook/ventoy-os-lib.sh if $GREP -q '^"$mount_handler"' /init; then - echo 'use mount_handler ...' >> $VTLOG + echo 'use mount_handler1 ...' >> $VTLOG vthookfile=/hooks/archiso @@ -37,6 +37,9 @@ if $GREP -q '^"$mount_handler"' /init; then if [ -f $vthookfile ]; then $SED '/while ! poll_device "${dev}"/a\ if /ventoy/busybox/sh /ventoy/hook/arch/ventoy-timeout.sh ${dev}; then break; fi' -i $vthookfile fi +elif $GREP -q '^$mount_handler' /init; then + echo 'use mount_handler2 ...' >> $VTLOG + $SED "/^\$mount_handler/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/arch/ventoy-disk.sh" -i /init elif $GREP -q '^KEEP_SEARCHING' /init; then echo 'KEEP_SEARCHING found ...' >> $VTLOG diff --git a/IMG/cpio/ventoy/ventoy_chain.sh b/IMG/cpio/ventoy/ventoy_chain.sh index 5c071a20..409089fb 100644 --- a/IMG/cpio/ventoy/ventoy_chain.sh +++ b/IMG/cpio/ventoy/ventoy_chain.sh @@ -342,6 +342,10 @@ ventoy_get_os_type() { echo "openEuler"; return fi + if $GREP -q 'venom' /proc/version; then + echo "arch"; return + fi + echo "default" }