diff options
author | Simon Rettberg | 2019-07-03 11:06:59 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-03 11:06:59 +0200 |
commit | 7f675fad47cbab58b3d535b924dc1486559bba9e (patch) | |
tree | dd2b5986f605e7b769934631575115faf97871cf /core/modules/vmware-common/data | |
parent | [vmware-common] Fix whitespace (diff) | |
download | mltk-7f675fad47cbab58b3d535b924dc1486559bba9e.tar.gz mltk-7f675fad47cbab58b3d535b924dc1486559bba9e.tar.xz mltk-7f675fad47cbab58b3d535b924dc1486559bba9e.zip |
[vmware-common] Improve max hw version detection
Since Mware decided to introduce a mismatch between major version and
max supported hw version, we now introduce another way...
Diffstat (limited to 'core/modules/vmware-common/data')
-rw-r--r-- | core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/init_core.inc | 11 |
1 files changed, 11 insertions, 0 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 aa39be03..2aba4cdf 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 @@ -35,6 +35,17 @@ declare -rg VM_HOME="${HOME}/.vmware" # mltk generates a vmware config file with several version infos for vmware/player, read it $(safesource "${VMWARE_PLUGIN_DIR}/vmware.conf") +# Determine maximum hw version +# 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 )" +fi + +[ -n "$gmax" ] && maxhardwareversion="$gmax" + # VMware start options # "-X": start in fullscreen declare -rg VM_START_OPTIONS="-X" |