X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/4c9065a60d98283b70ee08f9f0243595c52840ac..f683bcbd590c0d8a8dbe7dcf439b8c4450d7c854:/IMG/cpio/ventoy/ventoy_chain.sh diff --git a/IMG/cpio/ventoy/ventoy_chain.sh b/IMG/cpio/ventoy/ventoy_chain.sh index e135e1b..919632e 100644 --- a/IMG/cpio/ventoy/ventoy_chain.sh +++ b/IMG/cpio/ventoy/ventoy_chain.sh @@ -52,8 +52,12 @@ ventoy_get_os_type() { fi fi + # PrimeOS : + if $GREP -q 'PrimeOS' /proc/version; then + echo 'primeos'; return + # Debian : - if $GREP -q '[Dd]ebian' /proc/version; then + elif $GREP -q '[Dd]ebian' /proc/version; then echo 'debian'; return # Ubuntu : do the same process with debian @@ -338,6 +342,24 @@ ventoy_get_os_type() { echo "openEuler"; return fi + + #special arch based iso file check + if [ -f /init ]; then + if $GREP -q 'mount_handler' /init; then + if [ -d /hooks ]; then + if $BUSYBOX_PATH/ls -1 /hooks/ | $GREP -q '.*iso$'; then + echo "arch"; return + fi + elif [ -d /hook ]; then + if $BUSYBOX_PATH/ls -1 /hook/ | $GREP -q '.*iso$'; then + echo "arch"; return + fi + fi + fi + fi + + + echo "default" }