diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-09-06 11:25:27 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-09-06 11:25:27 +0000 |
commit | 9d884bfa84bff3c27290d7e9014f17f17cee517c (patch) | |
tree | a1e7c5cb512fbcfe029df3fea51d8fcc018060f7 /perl-install/standalone | |
parent | dace3a8c6ff8c9b01677d3ba11a8571daea3b16a (diff) | |
download | drakx-9d884bfa84bff3c27290d7e9014f17f17cee517c.tar drakx-9d884bfa84bff3c27290d7e9014f17f17cee517c.tar.gz drakx-9d884bfa84bff3c27290d7e9014f17f17cee517c.tar.bz2 drakx-9d884bfa84bff3c27290d7e9014f17f17cee517c.tar.xz drakx-9d884bfa84bff3c27290d7e9014f17f17cee517c.zip |
(build_tree) avoid code duplication, use network::modem::ppp_read_conf
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakconnect | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index ca274aede..7f1030f37 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -272,22 +272,7 @@ sub build_tree { } elsif ($interface eq 'modem') { $intf->{pages} = { 'TCP/IP' => 1, 'Account' => 1, 'Modem' => 1, 'Options' => 1 }; - # FIXME: code duplication, should be in network::modem::read_config - $intf->{device} = $netc->{autodetect}{modem}; - my %l = getVarsFromSh("/usr/share/config/kppprc"); - - $intf->{kppprc} = "/root/.kde/share/config/kppprc"; - my %m = getVarsFromSh($intf->{kppprc}); - $l{$_} = $m{$_} foreach keys %m; - - ($intf->{dns1}, $intf->{dns2}) = split(',', $l{DNS}); - $intf->{$_->[0]} = $l{$_->[1]} foreach [ 'connection' , 'Name' ], [ 'domain', 'Domain' ], [ 'login', 'Username' ], - [ 'Timeout', 'Timeout' ], [ 'UseLockFile', 'UseLockFile' ], [ 'Enter', 'Enter' ], - [ 'BusyWait', 'BusyWait' ], [ 'FlowControl', 'FlowControl' ], [ 'Speed', 'Speed' ], - [ 'DialTone', 'DialTone' ], [ 'Volume', 'Volume' ]; - /.*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"); - $_->{login} eq $intf->{login} and $intf->{passwd} = $_->{passwd} foreach @{network::tools::read_secret_backend()}; + put_in_hash($intf, network::modem::ppp_read_conf({}, $netc)); $intf->{save} = sub { network::modem::ppp_configure($in, $intf) }; } elsif ($interface eq 'isdn') { |