summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakups
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-01-03 15:41:30 +0000
committerOlivier Blin <oblin@mandriva.org>2006-01-03 15:41:30 +0000
commitc2dda5abbae0ef821d2d8c93e2cf90972279f1f8 (patch)
treed309965399fedd8fdd6c09c6a74e8d21ba98a7ac /perl-install/standalone/drakups
parentbe98e2d67ccfcb58c1c114bf6054b8dcb00250b0 (diff)
downloaddrakx-backup-do-not-use-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar
drakx-backup-do-not-use-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar.gz
drakx-backup-do-not-use-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar.bz2
drakx-backup-do-not-use-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar.xz
drakx-backup-do-not-use-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.zip
don't have a useless empty hash in wizards objects, use the wizards hash
Diffstat (limited to 'perl-install/standalone/drakups')
-rwxr-xr-xperl-install/standalone/drakups10
1 files changed, 4 insertions, 6 deletions
diff --git a/perl-install/standalone/drakups b/perl-install/standalone/drakups
index 60d626f40..1030cbc5e 100755
--- a/perl-install/standalone/drakups
+++ b/perl-install/standalone/drakups
@@ -63,10 +63,7 @@ sub add_device_wizard {
my ($in, $config) = @_;
my ($ups_models, $model_list) = readDriversList();
- use wizards;
my ($ups, $vendor, $model, $extra, $name, $driver, $port, @new_devices, $opts);
- my $w = wizards->new;
- my $wiz;
my %methods = (
# network => N("Connected through the network"), # need SNMP probe
# serial => N("Connected through a serial port"),
@@ -75,7 +72,8 @@ sub add_device_wizard {
manual => N("Manual configuration"),
);
my $method = $methods{auto};
- $wiz = {
+ require wizards;
+ my $wiz = wizards->new({
#defaultimage => "logdrake.png", # FIXME
name => N("Add an UPS device"),
pages => {
@@ -164,8 +162,8 @@ Please fill in its name, its driver and its port.", $model, $vendor);
next => 0
},
},
- };
- $w->process($wiz, $in);
+ });
+ $wiz->process($in);
$config->{$name}{driver} = $driver;
$config->{$name}{port} = $port;