summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakups
diff options
context:
space:
mode:
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;