summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-04-19 21:53:19 +0200
committerDirk von Suchodoletz2008-04-19 21:53:19 +0200
commit78aa938cafc426cd7beb85196d8961e7626063e6 (patch)
tree6b9c8527c9ffc393e5bc0d950541b5b7246813f2 /os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
parentIt seems to be more convinient to check the real thing, not the (diff)
downloadcore-78aa938cafc426cd7beb85196d8961e7626063e6.tar.gz
core-78aa938cafc426cd7beb85196d8961e7626063e6.tar.xz
core-78aa938cafc426cd7beb85196d8961e7626063e6.zip
Quick fix for the multiple installation problem of vmware plugin
(an installation just worked one time). The solution is not optimal, but avoids to run code, which might not execute on the platform and its much faster this way. The checking should be rewritten in perl and put to a function which decides for workstation/player too ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1750 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm')
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index 5214bde9..54231189 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -211,17 +211,21 @@ sub installationPhase
# version of local
if(-e "/usr/lib/vmware/bin/vmware"){
$vmfile = "vmware";
- # system() don't work, backticks or qx() needed!
+ # should be replaced with perl code (grepping in a textfile
+ # shouldn't be that complicated :))
$vmversion =
- qx(vmware -v | sed 's/VMware Workstation //'
- | sed 's/\(\.[0-9]\)\..*/\1/');
+ qx(strings /usr/lib/vmware/bin/vmplayer|
+ grep -m 1 "build-"| sed "s,.*build-,,");
chomp($vmversion);
rename ("/usr/bin/$vmfile", "/usr/bin/$vmfile.slx-bak");
linkFile("/var/X11R6/bin/$vmfile", "/usr/bin/$vmfile");
} elsif (-e "/usr/lib/vmware/bin/vmware") {
$vmfile = "vmplayer";
+ # dublicate of test for vmware - should be put into a function,
+ # e.g. in one which decides if workstation or player too ...
$vmversion =
- qx(vmplayer -v|sed 's/VMware Player //'|sed 's/\..*//');
+ qx(strings /usr/lib/vmware/bin/vmplayer|
+ grep -m 1 "build-"| sed "s,.*build-,,");
chomp($vmversion);
rename ("/usr/bin/$vmfile", "/usr/bin/$vmfile.slx-bak");
linkFile("/var/X11R6/bin/$vmfile", "/usr/bin/$vmfile");