From b998c69d89589cf824a8e00498d64d2cfd67ef8e Mon Sep 17 00:00:00 2001 From: Volker Uhrig Date: Fri, 8 Aug 2008 21:02:03 +0000 Subject: * Moved broken error handling in installationPhase() to preInstallationPhase() where the exit statment works git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1993 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm') diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index e1a90547..f8bc4be7 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -213,6 +213,18 @@ sub preInstallationPhase() my $pkgpath = $self->{attrs}->{'vmware::pkgpath'}; my $vmpl10 = $self->{attrs}->{'vmware::vmpl1.0'}; my $vmpl20 = $self->{attrs}->{'vmware::vmpl2.0'}; + my $local = $self->{attrs}->{'vmware::local'}; + + if ($local == 0 && $vmpl10 == 0 && $vmpl20 == 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 (! -d $pkgpath && ($vmpl10 == 1 || $vmpl20 == 1)) { print "\n\n * vmware::pkgpath: no such directory!\n"; @@ -248,18 +260,6 @@ 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(); } -- cgit v1.2.3-55-g7522