summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
diff options
context:
space:
mode:
authorVolker Uhrig2008-08-08 22:54:03 +0200
committerVolker Uhrig2008-08-08 22:54:03 +0200
commitf568fde9b53fcfc2a4a470d2e2ba7a6004ad7f81 (patch)
tree19392421114bd86ed55863d28bfb54971bb1b1e8 /os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
parentMoved the uc-mini-root.tbz into unpacked subdir. This is a little bit generous (diff)
downloadcore-f568fde9b53fcfc2a4a470d2e2ba7a6004ad7f81.tar.gz
core-f568fde9b53fcfc2a4a470d2e2ba7a6004ad7f81.tar.xz
core-f568fde9b53fcfc2a4a470d2e2ba7a6004ad7f81.zip
* better error handling
* fix of ticket #255 * error handling if no kind is installed is currently broken * documentation of exit statement in preInstallationPhase() added git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1992 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.pm36
1 files changed, 27 insertions, 9 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index b24d9386..e1a90547 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -189,7 +189,7 @@ sub getAttrInfo
#TODO
#content_regex => qr{^(1|0)$},
content_descr => '1 means active - 0 means inactive',
- default => '0',
+ default => '/root/vmware-pkgs',
},
# ** set of attributes for the installation of VM Workstation/Player
# versions. More than one package could be installed in parallel.
@@ -211,18 +211,24 @@ sub preInstallationPhase()
$self->{vendorOsPath} = $info->{'vendor-os-path'};
my $pkgpath = $self->{attrs}->{'vmware::pkgpath'};
+ my $vmpl10 = $self->{attrs}->{'vmware::vmpl1.0'};
+ my $vmpl20 = $self->{attrs}->{'vmware::vmpl2.0'};
- if (! -d $pkgpath) {
- print "\n\npkgpath: no such directory!\n\n";
+ if (! -d $pkgpath && ($vmpl10 == 1 || $vmpl20 == 1)) {
+ print "\n\n * vmware::pkgpath: no such directory!\n";
+ print " * vmware plugin was not installed!\n\n";
exit 1;
}
- # todo: ask oliver about a similiar function
- # like copyFile() just for directorys
- # or fix the manual after checked the source of
- # copyFile() function. check if copyFile etc. perldoc
- # is somewhere in the wiki documented else do it!
- system("cp -r $pkgpath $self->{pluginRepositoryPath}/packages");
+ # test just for the case we only set up local vmware
+ if (-d $pkgpath) {
+ # todo: ask oliver about a similiar function
+ # like copyFile() just for directorys
+ # or fix the manual after checked the source of
+ # copyFile() function. check if copyFile etc. perldoc
+ # is somewhere in the wiki documented else do it!
+ system("cp -r $pkgpath $self->{pluginRepositoryPath}/packages");
+ }
}
@@ -242,6 +248,18 @@ sub installationPhase
# TODO: write a list of installed/setted up and check it in stage3
# this will avoid conflict of configured vmware version in
# stage3 which are not setted up or installed in stage1
+ if ($self->{attrs}->{'vmware::local'} == 0 &&
+ $self->{attrs}->{'vmware::vmpl2.0'} == 0 &&
+ $self->{attrs}->{'vmware::vmpl2.0'} == 0) {
+ print "\n\n * At least one kind needs to get installed/activated:\n";
+ print " vmware::local=1 or\n";
+ print " vmware::vmpl1.0=1 or\n";
+ print " vmware::vmpl2.0=\n";
+ print " * vmware plugin was not installed!\n\n";
+ # TODO: write to mailingliste. exit 1 still let the plugin
+ # be installed in the database!
+ exit 1;
+ }
if ($self->{attrs}->{'vmware::local'} == 1) {
$self->_localInstallation();
}