summaryrefslogtreecommitdiffstats
path: root/perl-install/network/adsl.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-16 14:37:50 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-16 14:37:50 +0000
commitc0f8ad929ceccbea5f6ed9677034b61b6c39bc39 (patch)
tree184a4c3cc788dd9eb456cb6dfeb4ebf37a687033 /perl-install/network/adsl.pm
parentefa665b8d98cf83c3431e0c2f3dd80672cecc5cf (diff)
downloaddrakx-backup-do-not-use-c0f8ad929ceccbea5f6ed9677034b61b6c39bc39.tar
drakx-backup-do-not-use-c0f8ad929ceccbea5f6ed9677034b61b6c39bc39.tar.gz
drakx-backup-do-not-use-c0f8ad929ceccbea5f6ed9677034b61b6c39bc39.tar.bz2
drakx-backup-do-not-use-c0f8ad929ceccbea5f6ed9677034b61b6c39bc39.tar.xz
drakx-backup-do-not-use-c0f8ad929ceccbea5f6ed9677034b61b6c39bc39.zip
simplify pppoe configuration code
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r--perl-install/network/adsl.pm21
1 files changed, 7 insertions, 14 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 45da4b227..61f828333 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -207,13 +207,12 @@ mtu 1492),
avmadsl)
},
},
- );
- my %generic =
- (
- pppoe =>
+ pppoe_modem =>
{
- server => '"pppoe -I ' . ($modems{$adsl_device}{get_intf} ? "`$modems{$adsl_device}{get_intf}`" : $net->{adsl}{ethernet_device}) . '"',
+ server => {
+ pppoe => '"pppoe -I ' . ($modems{$adsl_device}{get_intf} ? "`$modems{$adsl_device}{get_intf}`" : $net->{adsl}{ethernet_device}) . '"',
+ },
ppp_options => qq(default-asyncmap
mru 1492
mtu 1492
@@ -225,7 +224,7 @@ nodeflate
lcp-echo-interval 20
lcp-echo-failure 3
),
- }
+ }
);
if ($adsl_type =~ /^pp|^capi$/) {
@@ -239,16 +238,10 @@ lcp-echo-failure 3
);
$in->do_pkgs->install(@{$packages{$adsl_type}});
- my $pty_option =
- exists $modems{$adsl_device}{server}{$adsl_type} ? "pty $modems{$adsl_device}{server}{$adsl_type}" :
- exists $generic{$adsl_type}{server} ? "pty $generic{$adsl_type}{server}" :
- "";
+ my $pty_option = exists $modems{$adsl_device}{server}{$adsl_type} && "pty $modems{$adsl_device}{server}{$adsl_type}";
my $plugin = exists $modems{$adsl_device}{plugin}{$adsl_type} && "plugin $modems{$adsl_device}{plugin}{$adsl_type}";
my $noipdefault = $adsl_type eq 'pptp' ? '' : 'noipdefault';
- my $ppp_options =
- exists $modems{$adsl_device}{ppp_options} ? $modems{$adsl_device}{ppp_options} :
- exists $generic{$adsl_type}{ppp_options} ? $generic{$adsl_type}{ppp_options} :
- "";
+ my $ppp_options = exists $modems{$adsl_device}{ppp_options} && $modems{$adsl_device}{ppp_options};
output("$::prefix/etc/ppp/peers/ppp0",
qq(lock
persist