summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakups
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-03-21 15:39:34 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-03-21 15:39:34 +0000
commitfe33ccd1ad8fde3fdc2873ff428076c917c3ec20 (patch)
treef088d546afe30b65fecf1a55a82d9988f8bd75e8 /perl-install/standalone/drakups
parent9425b08b1ba5510b882a25b59622642e6ff95a51 (diff)
downloaddrakx-backup-do-not-use-fe33ccd1ad8fde3fdc2873ff428076c917c3ec20.tar
drakx-backup-do-not-use-fe33ccd1ad8fde3fdc2873ff428076c917c3ec20.tar.gz
drakx-backup-do-not-use-fe33ccd1ad8fde3fdc2873ff428076c917c3ec20.tar.bz2
drakx-backup-do-not-use-fe33ccd1ad8fde3fdc2873ff428076c917c3ec20.tar.xz
drakx-backup-do-not-use-fe33ccd1ad8fde3fdc2873ff428076c917c3ec20.zip
(add_device_wizard) set extra parameters if present
Diffstat (limited to 'perl-install/standalone/drakups')
-rwxr-xr-xperl-install/standalone/drakups5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/standalone/drakups b/perl-install/standalone/drakups
index 488937fb8..5dbd6f6de 100755
--- a/perl-install/standalone/drakups
+++ b/perl-install/standalone/drakups
@@ -64,7 +64,7 @@ sub add_device_wizard {
my ($ups_models, $model_list) = readDriversList();
use wizards;
- my ($ups, $vendor, $model, $extra, $name, $driver, $port, @new_devices);
+ my ($ups, $vendor, $model, $extra, $name, $driver, $port, @new_devices, $opts);
my $w = wizards->new;
my $wiz;
my %methods = (
@@ -131,7 +131,7 @@ Do you want to autodetect UPS devices connected to this machine or to manually s
post => sub {
($vendor, $model, $extra) = ($1, $2, $3) if $ups =~ /(.*)\|(.*) \((.*)\)$/;
($name, $driver, $port) = ("myups", $ups_models->{$vendor}{$model . $extra}{driver}, "");
- ($driver) = split(/\s+/, $driver);
+ ($driver, $opts) = split(/\s+/, $driver);
"driver";
},
},
@@ -169,6 +169,7 @@ Please fill in its name, its driver and its port.", $model, $vendor);
$config->{$name}{driver} = $driver;
$config->{$name}{port} = $port;
+ $config->{$name}{$1} = $2 if $opts =~ /\b(.*)=(.*)\b/;
# refresh the GUI when needed:
$models{ups}->append_set(1 => $name, 2 => $driver, 3 => $port) if $models{ups};