diff options
author | Sebastian | 2012-04-25 18:49:45 +0200 |
---|---|---|
committer | Sebastian | 2012-04-25 18:49:45 +0200 |
commit | 3767d10ce0df2d48d66971cc0603db543894783c (patch) | |
tree | af01694b465fb0cec7e29b1108a8784a28f5abd4 | |
parent | (quick)fix problems with alternative firmware locations.. (diff) | |
download | core-3767d10ce0df2d48d66971cc0603db543894783c.tar.gz core-3767d10ce0df2d48d66971cc0603db543894783c.tar.xz core-3767d10ce0df2d48d66971cc0603db543894783c.zip |
fixes for vmware player 4.x / vmware workstation 8.x
-rw-r--r-- | src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 28 | ||||
-rw-r--r-- | src/os-plugins/plugins/vmware/files/run-virt.include | 6 |
2 files changed, 25 insertions, 9 deletions
diff --git a/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index abe83f5b..35e03f94 100644 --- a/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -420,7 +420,7 @@ sub _writeRunlevelScript insmod ${modpath}/vmmon.ko || return 1 insmod ${modpath}/vmnet.ko || return 1 End-of-Here - if ($kind eq 'local3X' || $kind eq 'vmpl3.X') { + if ($kind eq 'local3X' || $kind eq 'vmpl3.X' || $kind eq 'local4X') { $script .= unshiftHereDoc(<<" End-of-Here"); # VMplayer 3.X specific stuff insmod ${modpath}/vmci.ko @@ -508,7 +508,7 @@ sub _writeRunlevelScript vmnetif End-of-Here # start the USB arbitrator on higher VMware/player versions (3.0+) - if ($kind eq 'vmpl3.X' || $kind eq 'local3X') { + if ($kind eq 'vmpl3.X' || $kind eq 'local3X' || $kind eq 'local4X') { $script .= unshiftHereDoc(<<" End-of-Here"); vmblock End-of-Here @@ -645,14 +645,14 @@ sub _getVersion { $vmversion = $1; $vmbuildversion = $2; } - if ($data =~ m{\0(2\.[05])\.[0-9]}) { - $vmversion = $1; - } + #if ($data =~ m{(\d\.\d\.\d)}) { + # $vmversion = $1; + #} # else { TODO: errorhandling if file or string doesn't exist } # with vmplayer greater than 4.x the previous method doesn't work anymore # so we use strings tool to get at least the build number.. - if ($vmbuildversion == '') { + if ( ! defined $vmbuildversion || $vmbuildversion eq '') { $data = qx{strings $vmpath/bin/vmplayer}; if ($data =~ m{build-(\d+)}) { $vmbuildversion = $1; @@ -666,6 +666,20 @@ sub _getVersion { $versioninfo{vmversion} = $vmversion; $versioninfo{vmbuildversion} = $vmbuildversion; } + if ( ! defined $vmversion || $vmversion eq '' ) { + if (open(FH, "strings /usr/lib/vmware/lib/libvmplayer.so/libvmplayer.so | grep -E \"^[1-9]\" |")) { + $/ = undef; + my $data = <FH>; + close FH; + + if ($data =~ m{(\d\.\d)}) { + $vmversion = $1; + } + chomp($vmversion); + $versioninfo{vmversion} = $vmversion; + } + } + return %versioninfo; } @@ -707,6 +721,8 @@ sub _localInstallation # VMplayer 3.0, 3.1, Workstation 7.0, 7.1 } elsif ($vmversion eq "3.0" || $vmversion eq "7.0" || $vmversion eq "3.1" || $vmversion eq "7.1") { $kind="local3X"; + } elsif ($vmversion eq "4.0" || $vmversion eq "8.0") { + $kind="local4X"; } # Create runlevel script depending on detected version $self->_writeRunlevelScript("$vmpath", "$kind"); diff --git a/src/os-plugins/plugins/vmware/files/run-virt.include b/src/os-plugins/plugins/vmware/files/run-virt.include index db8ad234..33687f34 100644 --- a/src/os-plugins/plugins/vmware/files/run-virt.include +++ b/src/os-plugins/plugins/vmware/files/run-virt.include @@ -33,7 +33,7 @@ config.version = \"8\"" >>${conffile} ;; esac case "$vmversion" in - 2.*|3.*|6.*|7.*) + 2.*|3.*|4.*|6.*|7.*|8.*) shared_folder="TRUE" echo " # version specific stuff - ver. 2.*|3.*|6.*|7.* @@ -41,7 +41,7 @@ sharedFolder.option = \"alwaysEnabled\"" >>${conffile} ;; esac case "$vmversion" in - 2.5|3.*|6.5|7.*) + 2.5|3.*|4.*|6.5|7.*|8.*) if [ "${cpu_cores}" -ge "2" 2>/dev/null ]; then numvcpus="2" fi @@ -76,7 +76,7 @@ case "${vmostype}" in ;; esac case "$vmversion" in - 3.*|7.*|8.*) + 3.*|4.*|7.*|8.*) numvcpus="${cpu_cores}" if [ "${cpu_cores}" -ge "4" 2>/dev/null ]; then numvcpus="4" |