From 78aa938cafc426cd7beb85196d8961e7626063e6 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 19 Apr 2008 19:53:19 +0000 Subject: 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 --- os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'os-plugins') 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"); -- cgit v1.2.3-55-g7522