summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-02-25 06:07:07 +0100
committerDirk von Suchodoletz2009-02-25 06:07:07 +0100
commitdcda3cdb7dcfc2190253fdc87dd34e10ec22b384 (patch)
treed138ba257e3e82e3caa78337b9d6445812266cd8 /os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
parentCleaned up/restructured the mounting of fs components (function (diff)
downloadcore-dcda3cdb7dcfc2190253fdc87dd34e10ec22b384.tar.gz
core-dcda3cdb7dcfc2190253fdc87dd34e10ec22b384.tar.xz
core-dcda3cdb7dcfc2190253fdc87dd34e10ec22b384.zip
Simplified handling of mounting the image sources via newly
introduced function fsmount, see r2639. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2640 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.pm41
1 files changed, 21 insertions, 20 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index 82015534..7a4ff531 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -481,26 +481,27 @@ sub _getVersion {
my %versioninfo = (vmversion => "", vmbuildversion => "");
# get version information about installed vmplayer
- open(FH, "$vmpath/bin/vmplayer");
- $/ = undef;
- my $data = <FH>;
- close FH;
- # depending on the installation it could differ and has multiple build
- # strings
- if ($data =~ m{[^\d\.](\d\.\d) build-(\d+)}) {
- $vmversion = $1;
- $vmbuildversion = $2;
- }
- if ($data =~ m{\0(2\.[05])\.[0-9]}) {
- $vmversion = $1;
- }
- # else { TODO: errorhandling if file or string doesn't exist }
- chomp($vmversion);
- chomp($vmbuildversion);
-
- $versioninfo{vmversion} = $vmversion;
- $versioninfo{vmbuildversion} = $vmbuildversion;
- return %versioninfo;
+ if (open(FH, "$vmpath/bin/vmplayer")) {
+ $/ = undef;
+ my $data = <FH>;
+ close FH;
+ # depending on the installation it could differ and has multiple build
+ # strings
+ if ($data =~ m{[^\d\.](\d\.\d) build-(\d+)}) {
+ $vmversion = $1;
+ $vmbuildversion = $2;
+ }
+ if ($data =~ m{\0(2\.[05])\.[0-9]}) {
+ $vmversion = $1;
+ }
+ # else { TODO: errorhandling if file or string doesn't exist }
+ chomp($vmversion);
+ chomp($vmbuildversion);
+
+ $versioninfo{vmversion} = $vmversion;
+ $versioninfo{vmbuildversion} = $vmbuildversion;
+ }
+ return %versioninfo;
}
########################################################################