Changed the implementation of cmdSetup to store the results of the selecting service lists in an array instead of a scalar.

This commit is contained in:
ian%hixie.ch 2001-12-26 17:45:05 +00:00
Родитель 4b59654786
Коммит ffe3cb5b17
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -72,20 +72,20 @@ sub verifyInput {
sub cmdSetup {
my $self = shift;
my($app) = @_;
my $result;
# call all the setup handlers until one fails:
# the setupX methods can call $app->output->setupProgress('name of component');
# the setupX methods can call $app->output->setupProgress('component.subcomponent');
$app->getPipingServiceList('setup.events.start')->setupStarting($app);
$result = $app->getSelectingServiceList('setup.configure')->setupConfigure($app);
if (not $result) {
$result = $app->getSelectingServiceList('setup.install')->setupInstall($app);
$app->output->setupProgress('setup');
my @result = $app->getSelectingServiceList('setup.configure')->setupConfigure($app);
if (not @result) {
@result = $app->getSelectingServiceList('setup.install')->setupInstall($app);
}
# report on the result
if (defined($result)) {
if (@result) {
# if we failed, first report that then signal that
# configuration has ended
$self->dump(9, "Failed to setup because argument '$result' was missing.");
$app->output->setupFailed($result);
$self->dump(9, "Failed to setup because argument '$result[0]' was missing.");
$app->output->setupFailed($result[0]);
$app->getPipingServiceList('setup.events.end')->setupEnding($app);
} else {
# if it did not fail, then signal that configuration ended and