diff options
author | Volker Uhrig | 2008-05-02 19:19:21 +0200 |
---|---|---|
committer | Volker Uhrig | 2008-05-02 19:19:21 +0200 |
commit | 2d3ca7b34b6f7eb49d6a7a4a20ed0bf6f5ef5a93 (patch) | |
tree | ef29826f7446e3a0dbe4728f6ff02f5f57a402be | |
parent | * created function for version check (diff) | |
download | core-2d3ca7b34b6f7eb49d6a7a4a20ed0bf6f5ef5a93.tar.gz core-2d3ca7b34b6f7eb49d6a7a4a20ed0bf6f5ef5a93.tar.xz core-2d3ca7b34b6f7eb49d6a7a4a20ed0bf6f5ef5a93.zip |
* optimization of function... or perhaps not... depending on the next
days
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1761 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index 8d1110fe..e13d9cf7 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -203,23 +203,18 @@ sub installationPhase if ($type eq "local") { $vmpath = "/usr/lib/vmware"; $vmbin = "/usr/bin"; - #TODO: error handling if non installed or not supported - # version of local # if vmware ws is installed, vmplayer is installed, too. # we will only use vmplayer if (-e "/usr/lib/vmware/bin/vmplayer") { # perhaps not optimal with the array, but how to solve # else if we don't want to open the file twice? - @versioninfo = $self->_checkVersion("/usr/lib/vmware/bin/vmplayer"); - $vmbuildversion = pop(@versioninfo); - $vmversion = pop(@versioninfo); - - print "DEBUG: vmplayer version: $vmversion\n"; - print " and build-version: $vmbuildversion\n"; + @versioninfo = + $self->_checkVersion("/usr/lib/vmware/bin/vmplayer", $type); + # TODO: rename ok? recheck + # linkfile will be in conflict with local installed + # versions. => move to stage3 rename("/usr/bin/vmplayer", "/usr/bin/vmplayer.slx-bak"); - # TODO: rename ok, but linkfile will be in conflict - # with local installed versions. => move to stage3 #linkFile("/var/X11R6/bin/vmplayer", "/usr/bin/vmplayer"); } } @@ -329,11 +324,15 @@ sub _writeRunlevelScript } -# function checks vmplayer version and buildnumber +# function checks vmplayer version and buildnumber and writes it to a +# file +# Ehhhh... do we really need this function? we only need one check for +# local... damnit. sub _checkVersion { my $self = shift; my $file = shift; + my $type = shift; my $vmversion = ""; my $vmbuildversion = ""; @@ -349,9 +348,17 @@ sub _checkVersion } chomp($vmversion); chomp($vmbuildversion); - my @returnarray = ($vmversion, $vmbuildversion); - return @returnarray; + #TODO: 1. check if the version is supported + # 2. write infos to file /opt/openslx/vmware/Ń–nstalled_versions + # style: + # local_supported = (yes|no) + # local_vmversion = $vmversion + # local_vmbuildversion = $vmbuildversion + # #check if we really need the following lines + # ws2_installed (yes|no) + # ws2_version = 2.x + # ... } 1; |