From 6d26b953c36cf6e79aed52dc4e8045638fe9ab2a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Jan 2004 15:28:31 +0000 Subject: fix gateway reading and writing --- perl-install/network/netconnect.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index e0f26a22d..61e62717b 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -432,6 +432,7 @@ killall pppd $modem ||= $netcnx->{$netcnx->{type}}; $modem->{device} ||= $first_modem->()->{device}; my %l = getVarsFromSh("$::prefix/usr/share/config/kppprc"); + $modem->{Gateway} ||= $l{Gateway}; $modem->{connection} ||= $l{Name}; $modem->{domain} ||= $l{Domain}; ($modem->{dns1}, $modem->{dns2}) = split(',', $l{DNS}); @@ -449,6 +450,7 @@ killall pppd #my $secret = network::tools::read_secret_backend(); #my @cnx_list = map { $_->{server} } @$secret; $modem->{$_} ||= '' foreach qw(connection phone login passwd auth domain dns1 dns2); + }, name => N("Dialup: account options"), data => sub { @@ -508,7 +510,7 @@ killall pppd data => sub { [ { label => N("Gateway"), type => "list", val => \$modem->{auto_gateway}, list => [ N("Automatic"), N("Manual") ] }, - { label => N("Gateway IP address"), val => \$modem->{dns1}, + { label => N("Gateway IP address"), val => \$modem->{Gateway}, disabled => sub { $modem->{auto_gateway} eq N("Automatic") } }, ]; }, -- cgit v1.2.1