summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-05-31 09:04:56 +0000
committerOlivier Blin <oblin@mandriva.org>2005-05-31 09:04:56 +0000
commit8a8a92a20f34c433c5a2e249f1095811137b560b (patch)
treecfb1ca27cd07424872ebb1255432f7d1f07d37ec
parentb17649b756b9b969530784c29468a53e516de0db (diff)
downloaddrakx-8a8a92a20f34c433c5a2e249f1095811137b560b.tar
drakx-8a8a92a20f34c433c5a2e249f1095811137b560b.tar.gz
drakx-8a8a92a20f34c433c5a2e249f1095811137b560b.tar.bz2
drakx-8a8a92a20f34c433c5a2e249f1095811137b560b.tar.xz
drakx-8a8a92a20f34c433c5a2e249f1095811137b560b.zip
if__(exists $foo, $bar) returns $bar whatever $foo is, don't try to
make smart code that don't work (initial goal was probably to hide some isdn settings if they weren't set)
-rw-r--r--perl-install/network/netconnect.pm43
1 files changed, 18 insertions, 25 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 81df88dfb..0ab7b5c6b 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -343,31 +343,24 @@ sub real_main {
name => N("Connection Configuration") . "\n\n" .
N("Please fill or check the field below"),
data => sub {
- [
- (map {
- my ($dstruct, $field, $item) = @$_;
- $item->{val} = \$dstruct->{$field};
- if__(exists $dstruct->{$field}, $item);
- } ([ $isdn, "irq", { label => N("Card IRQ") } ],
- [ $isdn, "mem", { label => N("Card mem (DMA)") } ],
- [ $isdn, "io", { label => N("Card IO") } ],
- [ $isdn, "io0", { label => N("Card IO_0") } ],
- [ $isdn, "io1", { label => N("Card IO_1") } ],
- [ $isdn, "phone_in", { label => N("Your personal phone number") } ],
- [ $netc, "DOMAINNAME2", { label => N("Provider name (ex provider.net)") } ],
- [ $isdn, "phone_out", { label => N("Provider phone number") } ],
- [ $netc, "dnsServer2", { label => N("Provider DNS 1 (optional)") } ],
- [ $netc, "dnsServer3", { label => N("Provider DNS 2 (optional)") } ],
- [ $isdn, "dialing_mode", { label => N("Dialing mode"), list => ["auto", "manual"] } ],
- [ $isdn, "speed", { label => N("Connection speed"), list => ["64 Kb/s", "128 Kb/s"] } ],
- [ $isdn, "huptimeout", { label => N("Connection timeout (in sec)") } ],
- )
- ),
- ({ label => N("Account Login (user name)"), val => \$isdn->{login} },
- { label => N("Account Password"), val => \$isdn->{passwd}, hidden => 1 },
- )
- ];
- },
+ [
+ { label => N("Card IRQ"), val => \$isdn->{irq} },
+ { label => N("Card mem (DMA)"), val => \$isdn->{mem} },
+ { label => N("Card IO"), val => \$isdn->{io} },
+ { label => N("Card IO_0"), val => \$isdn->{io0} },
+ { label => N("Card IO_1"), val => \$isdn->{io1} },
+ { label => N("Your personal phone number"), val => \$isdn->{phone_in} },
+ { label => N("Provider name (ex provider.net)"), val => \$netc->{DOMAINNAME2} },
+ { label => N("Provider phone number"), val => \$isdn->{phone_out} },
+ { label => N("Provider DNS 1 (optional)"), val => \$netc->{dnsServer2} },
+ { label => N("Provider DNS 2 (optional)"), val => \$netc->{dnsServer3} },
+ { label => N("Dialing mode"), list => ["auto", "manual"], val => \$isdn->{dialing_mode} },
+ { label => N("Connection speed"), list => ["64 Kb/s", "128 Kb/s"], val => \$isdn->{speed} },
+ { label => N("Connection timeout (in sec)"), val => \$isdn->{huptimeout} },
+ { label => N("Account Login (user name)"), val => \$isdn->{login} },
+ { label => N("Account Password"), val => \$isdn->{passwd}, hidden => 1 },
+ ];
+ },
post => sub {
network::isdn::write_config($isdn);
$netc->{$_} = 'ippp0' foreach 'NET_DEVICE', 'NET_INTERFACE';