diff options
Diffstat (limited to 'core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc')
-rw-r--r-- | core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc index 8a71a21b..ae1900cd 100644 --- a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc +++ b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc @@ -39,9 +39,17 @@ $(safesource "${VMWARE_PLUGIN_DIR}/vmware.conf") # Try to tell from the xml files in this dir, and hope nobody added any gmax="$( find /etc/vmware/hostd/env/ -name "ws-*.xml" | grep -o '[0-9]*' | sort -nr | head -n 1 )" if [ -z "$gmax" ]; then - # Failed, guess major version number == max hw version, which unfortunately VMware decided to fuck up with - # VMware 15.1.0, which supports hw version 16 - gmax="$( grep -m 1 -F '.product.version' /etc/vmware/config | grep -o '[0-9]*' | head -n 1 )" + # Failed, VMware 16 doesn't have above xml files anymore, great. Back to hard coded lists + gmax="$( grep -m 1 -F '.product.version' /etc/vmware/config | grep -oE '[0-9]+\.[0-9.]+' | head -n 1 )" + case "$gmax" in + 16.*) gmax=18 ;; + 15.5.*|15.1.*) gmax=16 ;; + *) + # No hit, guess major version number == max hw version, which unfortunately VMware decided to fuck up with + # VMware 15.1.0, which supports hw version 16 + gmax="${gmax%%.*}" + ;; + esac fi [ -n "$gmax" ] && maxhardwareversion="$gmax" |