diff options
-rw-r--r-- | perl-install/network/adsl.pm | 21 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 5 |
2 files changed, 10 insertions, 16 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 diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index a9c76b3fb..f3df13cc3 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -748,6 +748,7 @@ If you do not know it, keep the preselected type."), $auto_ip = $net->{adsl}{method} eq 'dhcp'; return 'lan_intf'; } + member($net->{adsl}{method}, qw(pppoe pptp)) and $net->{adsl}{ethernet_device} = $ntf_name; return 'adsl_account'; }, }, @@ -757,7 +758,6 @@ If you do not know it, keep the preselected type."), { pre => sub { network::adsl::adsl_probe_info($net); - member($net->{adsl}{method}, qw(pppoe pptp)) and $net->{adsl}{ethernet_device} = $ntf_name; $net->{net_interface} = 'ppp0'; ($adsl_vpi, $adsl_vci) = (hex($net->{adsl}{vpi}), hex($net->{adsl}{vci})); }, @@ -788,8 +788,9 @@ If you do not know it, keep the preselected type."), ($net->{adsl}{vpi}, $net->{adsl}{vci}) = map { sprintf("%x", $_) } ($adsl_vpi, $adsl_vci); $net->{adsl}{device} = - $net->{adsl}{method} eq 'pptp' ? 'pptp_modem' : $net->{adsl}{method} eq 'capi' ? 'capi_modem' : + $net->{adsl}{method} eq 'pppoe' ? 'pppoe_modem' : + $net->{adsl}{method} eq 'pptp' ? 'pptp_modem' : $ntf_name; # FIXME: duplicate with $after_start_on_boot_step sub network::adsl::adsl_conf_backend($in, $modules_conf, $net); |