diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-20 11:10:47 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-20 11:10:47 +0000 |
commit | 623e1309b716624dceff13a4b16814af77f63234 (patch) | |
tree | d293e00af96f89ed81513e2e22ddb9acf74babb7 /perl-install/network | |
parent | 7dc7d6507c3b5f695f7b535f909d64fbe22176e6 (diff) | |
download | drakx-backup-do-not-use-623e1309b716624dceff13a4b16814af77f63234.tar drakx-backup-do-not-use-623e1309b716624dceff13a4b16814af77f63234.tar.gz drakx-backup-do-not-use-623e1309b716624dceff13a4b16814af77f63234.tar.bz2 drakx-backup-do-not-use-623e1309b716624dceff13a4b16814af77f63234.tar.xz drakx-backup-do-not-use-623e1309b716624dceff13a4b16814af77f63234.zip |
keep entered data when stepping back to dialup options step
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/netconnect.pm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 348bf1229..f5c777a9a 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -426,25 +426,27 @@ Take a look at http://www.linmodems.org"), q(ifdown ppp0 killall pppd ), $netcnx->{type}); - $modem = $netcnx->{$netcnx->{type}}; - $modem->{device} = $first_modem->()->{device}; + $netcnx->{$netcnx->{type}} ||= {}; + $modem ||= $netcnx->{$netcnx->{type}}; + $modem->{device} ||= $first_modem->()->{device}; my %l = getVarsFromSh("$::prefix/usr/share/config/kppprc"); - $modem->{connection} = $l{Name}; - $modem->{domain} = $l{Domain}; - ($modem->{dns1}, $modem->{dns2}) = split(',', $l{DNS}); + $modem->{connection} ||= $l{Name}; + $modem->{domain} ||= $l{Domain}; + ($modem->{dns1}, $modem->{dns2}) ||= split(',', $l{DNS}); foreach (cat_("/etc/sysconfig/network-scripts/chat-ppp0")) { - /.*ATDT(\d*)/ and $modem->{phone} = $1; + /.*ATDT(\d*)/ and $modem->{phone} ||= $1; } foreach (cat_("/etc/sysconfig/network-scripts/ifcfg-ppp0")) { - /NAME=(['"]?)(.*)\1/ and $modem->{login} = $2; + /NAME=(['"]?)(.*)\1/ and $modem->{login} ||= $2; } my $secret = network::tools::read_secret_backend(); foreach (@$secret) { - $modem->{passwd} = $_->{passwd} if $_->{login} eq $modem->{login}; + $modem->{passwd} ||= $_->{passwd} if $_->{login} eq $modem->{login}; } #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 options"), data => sub { |