diff options
author | Simon Rettberg | 2020-10-13 11:31:30 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-10-13 11:31:30 +0200 |
commit | bf67a23c74873aa616f6b1b8359ef663978f8c46 (patch) | |
tree | 9a1a8c860d142fedec8e134520013d667075d9f5 /core/modules | |
parent | [vbox-src] Fix (diff) | |
download | mltk-bf67a23c74873aa616f6b1b8359ef663978f8c46.tar.gz mltk-bf67a23c74873aa616f6b1b8359ef663978f8c46.tar.xz mltk-bf67a23c74873aa616f6b1b8359ef663978f8c46.zip |
[vmware-common] Hard-coded lookup table for hwversion
Unfortunately, looking this up from files lying around was a short-lived
endeavor.
Diffstat (limited to 'core/modules')
-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" |