summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2004-01-30 15:02:42 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2004-01-30 15:02:42 +0000
commit6b496f916ed6ddd708dcc673dafda99aec49f0c3 (patch)
tree930a33cf13de2c3e08e1109473108fa5e3694b94
parent1da643cd70b492ff9be02ca7ccf8ab8eb656d9ba (diff)
downloaddrakx-6b496f916ed6ddd708dcc673dafda99aec49f0c3.tar
drakx-6b496f916ed6ddd708dcc673dafda99aec49f0c3.tar.gz
drakx-6b496f916ed6ddd708dcc673dafda99aec49f0c3.tar.bz2
drakx-6b496f916ed6ddd708dcc673dafda99aec49f0c3.tar.xz
drakx-6b496f916ed6ddd708dcc673dafda99aec49f0c3.zip
- remove not needed $security
- clean dumb foreach repetition (one foreach to rule them all)
-rwxr-xr-xperl-install/standalone/drakconnect9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 282345561..86d0fbe84 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -265,8 +265,7 @@ sub build_tree {
$intf->{$_->[0]} = $l{$_->[1]} foreach [ 'connection' , 'Name' ], [ 'domain', 'Domain' ], [ 'login', 'Username' ];
/.*ATDT(\d*)/ and $intf->{phone} = $1 foreach cat_("/etc/sysconfig/network-scripts/chat-ppp0");
/NAME=(['"]?)(.*)\1/ and $intf->{login} ||= $2 foreach cat_("/etc/sysconfig/network-scripts/ifcfg-ppp0");
- my $security = network::tools::read_secret_backend();
- $_->{login} eq $intf->{login} and $intf->{passwd} = $_->{passwd} foreach @$security;
+ $_->{login} eq $intf->{login} and $intf->{passwd} = $_->{passwd} foreach @{network::tools::read_secret_backend()};
$intf->{save} = sub { network::modem::ppp_configure($in, $intf) };
}
elsif ($interface eq 'isdn') {
@@ -496,8 +495,10 @@ sub populate_notebook {
sub save {
my ($netc, $netcnx, $intf, $gui, $apply_button) = @_;
- save_notebook($netc, $intf->{$_}, $gui->{$_}) foreach keys %$intf;
- $intf->{$_}{save} and $intf->{$_}{save}->() foreach keys %$intf;
+ foreach (keys %$intf) {
+ save_notebook($netc, $intf->{$_}, $gui->{$_});
+ $intf->{$_}{save} and $intf->{$_}{save}->();
+ }
apply($netc, $netcnx, $intf, $apply_button);
}