diff options
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r-- | perl-install/network/adsl.pm | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index 9dab12255..26d2565fc 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -134,17 +134,17 @@ sync speedtouch => { - start => '/usr/sbin/modem_run -v 0 -f /usr/share/speedtouch/mgmt.o', + start => '/usr/sbin/modem_run -k -n 2 -f /usr/share/speedtouch/mgmt.o', overide_script => 1, server => { - pppoa => '"/usr/sbin/pppoa3 -e 1 -c -vpi ' . hex($netc->{vpi}) . " -vci " . hex($netc->{vci}) . '"', + pppoa => '"/usr/sbin/pppoa3 -e 1 -c" +plugin pppoatm.so +' . join('.', hex($netc->{vpi}), hex($netc->{vci})), }, ppp_options => qq( sync noaccomp), aliases => [ - # disable kernel driver, we use userland stuff but for firmware upload - if_(c::kernel_version() =~ /^\Q2.4/, ['speedtch', 'off']), ['char-major-108', 'ppp_generic'], ['tty-ldisc-3', 'ppp_async'], ['tty-ldisc-13', 'n_hdlc'], @@ -156,7 +156,9 @@ noaccomp), }, sagem => { - start => "/usr/sbin/eaglectrl -w", + start => qq( +modprobe eagle-usb +/usr/sbin/eaglectrl -w), stop => "/usr/bin/killall pppoa", get_intf => "/usr/sbin/eaglectrl -i", server => { @@ -235,10 +237,10 @@ usepeerdns defaultroute) ); + my $pty_option = $modems{$adsl_device}{server}{$adsl_type} && "pty $modems{$adsl_device}{server}{$adsl_type}"; output("$::prefix/etc/ppp/peers/adsl", qq(noauth noipdefault -pty $modems{$adsl_device}{server}{$adsl_type} $modems{$adsl_device}{ppp_options} kdebug 1 nopcomp @@ -249,6 +251,7 @@ maxfail 25 persist usepeerdns defaultroute +$pty_option user "$adsl->{login}" )); @@ -284,10 +287,9 @@ user "$adsl->{login}" set_cnx_script($netc, "adsl", join("\n", "/sbin/route del default", $modems{$adsl_device}{start}, - # /usr/sbin/pppd call adsl - #$modems{$adsl_device}{server}{$adsl_type} || - "/usr/sbin/pppd file /etc/ppp/peers/adsl $modems{$adsl_device}{pppd_options}", - $ppp_options{$adsl_type}{connect} + $ppp_options{$adsl_type}{connect} || + "/usr/sbin/pppd file /etc/ppp/peers/adsl $modems{$adsl_device}{pppd_options}", + "" ), $ppp_options{$adsl_type}{disconnect}, $netc->{adsltype} @@ -336,9 +338,16 @@ INTERFACE=`$modems{$adsl_device}{get_intf}` } elsif ($adsl_device eq 'speedtouch') { # speedtouch really is used only with pppoa, let its own script handle firmware upload and the like: set_cnx_script($netc, 'adsl', - qq(/sbin/route del default -/usr/share/speedtouch/speedtouch.sh start\n), - "/usr/share/speedtouch/speedtouch.sh stop\n", + qq(/sbin/route del default 2>/dev/null +/usr/sbin/modem_run -k -n 2 -f /usr/share/speedtouch/mgmt.o +pppd call adsl + +for i in 0 1 2 3 4; do + /sbin/ifconfig | grep -q 'ppp' && exit + sleep 3 +done +exit 1\n), + "/usr/bin/killall pppd\n", $netc->{adsltype}); } |