summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-20 11:10:47 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-20 11:10:47 +0000
commit623e1309b716624dceff13a4b16814af77f63234 (patch)
treed293e00af96f89ed81513e2e22ddb9acf74babb7 /perl-install/network
parent7dc7d6507c3b5f695f7b535f909d64fbe22176e6 (diff)
downloaddrakx-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.pm18
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 {