summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm31
-rw-r--r--perl-install/network/netconnect.pm3
2 files changed, 32 insertions, 2 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 678ffb980..3ceba8354 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -98,9 +98,38 @@ sub adsl_conf_backend {
# FIXME: should not be needed:
defined $o_netcnx and $netc->{adsltype} = $o_netcnx->{type};
$netc->{adsltype} ||= "adsl_$adsl_type";
+ my $bewan_module;
+ $bewan_module = $o_netcnx->{bus} eq 'PCI' ? 'unicorn_pci_atm' : 'unicorn_usb_atm' if $adsl_device eq "bewan";
# all supported modems came with their own pppoa module, so no need for "plugin pppoatm.so"
my %modems = (
+ bewan => {
+ start => qq(
+modprobe pppoatm
+# ActivationMode=1
+modprobe $bewan_module
+# wait for the modem to be set up:
+sleep 10
+),
+ stop => qq(modprobe -r $bewan_module),
+ pppd_options => "plugin pppoatm.so $netc->{vpi}." . hex($netc->{vci}),
+ ppp_options => qq(
+lock
+ipparam ppp0
+default-asyncmap
+hide-password
+noaccomp
+nobsdcomp
+nodeflate
+novj novjccomp
+lcp-echo-interval 20
+lcp-echo-failure 3
+mtu 1200
+mru 1200
+sync
+),
+ },
+
speedtouch =>
{
start => '/usr/sbin/modem_run -v 0 -f /usr/share/speedtouch/mgmt.o',
@@ -228,7 +257,7 @@ user "$adsl->{login}"
$modems{$adsl_device}{start},
# /usr/sbin/pppd call adsl
#$modems{$adsl_device}{server}{$adsl_type} ||
- "/usr/sbin/pppd file /etc/ppp/peers/adsl",
+ "/usr/sbin/pppd file /etc/ppp/peers/adsl $modems{$adsl_device}{pppd_options}",
$ppp_options{$adsl_type}{connect}
),
$ppp_options{$adsl_type}{disconnect},
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 0ecc434af..f58a66cd7 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -649,6 +649,7 @@ killall pppd
$in->do_pkgs->ensure_is_installed_if_available('speedtouch_mgmt', "$::prefix/usr/share/speedtouch/mgmt.o");
return 'adsl_speedtouch_firmware' if ! -e "$::prefix/usr/share/speedtouch/mgmt.o";
}
+ $netcnx->{bus} = $netc->{autodetect}{adsl}{bewan}{bus} if $ntf_name eq 'bewan';
if ($ntf_name eq 'bewan' && !$::testing) {
$in->do_pkgs->ensure_is_installed_if_available('unicorn', "$::prefix/usr/bin/bewan_adsl_status");
}
@@ -797,7 +798,7 @@ If you don't know, choose 'use pppoe'"),
},
post => sub {
$netc->{internet_cnx_choice} = 'adsl';
- network::adsl::adsl_conf_backend($in, $netcnx, $netc, $ntf_name, $adsl_type); #FIXME
+ network::adsl::adsl_conf_backend($in, $netcnx, $netc, $ntf_name, $adsl_type, $netcnx); #FIXME
$config->{adsl} = { kind => $ntf_name, protocol => $adsl_type };
$handle_multiple_cnx->();
},