X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/44b38dce74f3b28bab2ae6d48d04aa17117e0695..261ddcef45ede2f9440342a5b3dd474e26df1679:/IMG/cpio/ventoy/ventoy_chain.sh diff --git a/IMG/cpio/ventoy/ventoy_chain.sh b/IMG/cpio/ventoy/ventoy_chain.sh index 409089f..fbde4c8 100644 --- a/IMG/cpio/ventoy/ventoy_chain.sh +++ b/IMG/cpio/ventoy/ventoy_chain.sh @@ -93,7 +93,10 @@ ventoy_get_os_type() { # Fedora : do the same process with rhel7 elif $GREP -q '\.fc[0-9][0-9]\.' /proc/version; then echo 'rhel7'; return - + + elif $GREP -q 'euleros' /proc/version; then + echo 'rhel7'; return + # SUSE elif $GREP -q 'SUSE' /proc/version; then echo 'suse'; return @@ -342,10 +345,31 @@ ventoy_get_os_type() { echo "openEuler"; return fi - if $GREP -q 'venom' /proc/version; then - echo "arch"; return + + #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 + + + #Kylin V10 Server + if [ -f /usr/sbin/dhclient ]; then + if $BUSYBOX_PATH/strings /usr/sbin/dhclient | $GREP -i -q -m1 openeuler; then + echo 'openEuler'; return + fi fi + echo "default" }