diff options
author | damien <damien@mandriva.com> | 2001-08-24 01:13:45 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-08-24 01:13:45 +0000 |
commit | 08b9c98f8885c81df34e3c527de33164a50006e7 (patch) | |
tree | 41b714464cb319c0dc1bad0dc882ed4620b4d0c4 /perl-install/network | |
parent | c6d1d30e6bec3c43f617427e0029dcc8fb0b67fe (diff) | |
download | drakx-08b9c98f8885c81df34e3c527de33164a50006e7.tar drakx-08b9c98f8885c81df34e3c527de33164a50006e7.tar.gz drakx-08b9c98f8885c81df34e3c527de33164a50006e7.tar.bz2 drakx-08b9c98f8885c81df34e3c527de33164a50006e7.tar.xz drakx-08b9c98f8885c81df34e3c527de33164a50006e7.zip |
speedtouch configuration
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/adsl.pm | 27 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 6 | ||||
-rw-r--r-- | perl-install/network/tools.pm | 6 |
3 files changed, 31 insertions, 8 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index b12cab169..956de5862 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -47,7 +47,7 @@ If you don't know, choose 'use pppoe'"), [__("use pppoe"), __("use pptp"), __("u $in->do_pkgs->install(qw(speedtouch)); $netcnx->{type} = "adsl_$type"; $netcnx->{"adsl_$type"} = {}; - $netcnx->{"adsl_$type"}{vcivpi} = ''; + $netcnx->{"adsl_$type"}{vpivci} = ''; adsl_conf($netcnx->{"adsl_$type"}, $netc, $intf, $type) or goto conf_adsl_step1; } 1; @@ -90,13 +90,13 @@ sub adsl_conf_backend { my ($adsl, $netc, $adsl_type) = @_; output("$prefix/etc/ppp/options", -"lock +'lock noipdefault persist noauth usepeerdns defaultroute -") if $adsl_type =~ /pptp|pppoe|speedtouch/; +') if $adsl_type =~ /pptp|pppoe|speedtouch/; write_secret_backend($adsl->{login}, $adsl->{passwd}); @@ -107,6 +107,27 @@ defaultroute } "$prefix/etc/ppp/pppoe.conf"; } + if ($adsl_type eq 'speedtouch') { + $netc->{vpivci} =~ /(\d+)\.(\d+)/; + output("$prefix/etc/ppp/peers/adsl", +qq{noauth +noipdefault +pty "/usr/bin/pppoa2 -vpi $1 -vci $2" +sync +noaccomp +nopcomp +noccp +novj +holdoff 4 +maxfail 25 +persist +usepeerdns +$USERLINE +defaultroute +user "$adsl->{login}" +}); + } + if ($adsl_type eq 'pptp') { write_cnx_script($netc, "adsl", "/sbin/route del default diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index c0760322d..10bf28f3f 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -408,7 +408,8 @@ DOMAINNAME2=$netc->{DOMAINNAME2}" ["$prefix/etc/ppp/ioptions2B", "iop2B"], ["$prefix/etc/isdn/isdn1B.conf", "isdn1B"], ["$prefix/etc/isdn/isdn2B.conf", "isdn2B"], - ["$prefix/etc/resolv.com", "resolv"], + ["$prefix/etc/resolv.conf", "resolv"], + ["$prefix/etc/ppp/peers/adsl", "speedtouch"], ) { my $file = "$prefix/etc/sysconfig/network-scripts/net_" . $_->[1] . "." . $a; -e ($_->[0]) and commands::cp("-f", $_->[0], $file) and chmod 0755, $file; @@ -432,6 +433,7 @@ sub set_profile { ["$prefix/etc/isdn/isdn1B.conf", "isdn1B"], ["$prefix/etc/isdn/isdn2B.conf", "isdn2B"], ["$prefix/etc/resolv.conf", "resolv"], + ["$prefix/etc/ppp/peers/adsl", "speedtouch"], ) { my $c = "$prefix/etc/sysconfig/network-scripts/net_" . $_->[1] . "." . $profile; -e ($c) and commands::cp("-f", $c, $_->[0]); @@ -444,7 +446,7 @@ sub del_profile { $profile eq "default" and return; print "deleting $profile\n"; commands::rm("-f", "$prefix/etc/sysconfig/network-scripts/draknet_conf." . $profile); - commands::rm("-f", glob_("$prefix/etc/sysconfig/network-scripts/net_{up,down,prog,iop1B,iop2B,isdn1B,isdn2B,resolv}." . $profile)); + commands::rm("-f", glob_("$prefix/etc/sysconfig/network-scripts/net_{up,down,prog,iop1B,iop2B,isdn1B,isdn2B,resolv,speedtouch}." . $profile)); } sub add_profile { diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index b8a043204..10f362a46 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -81,7 +81,7 @@ sub ask_info2 { if__($cnx->{phone_out}, { label => _("Provider phone number"), val => \$cnx->{phone_out} }), if__($netc->{dnsServer2}, { label => _("Provider dns 1 (optional)"), val => \$netc->{dnsServer2} }), if__($netc->{dnsServer3}, { label => _("Provider dns 2 (optional)"), val => \$netc->{dnsServer3} }), - if__($netc->{vcivpi}, { label => _("Choose your country"), val => \$netc->{vcivpi}, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'] }), + if__($netc->{vpivci}, { label => _("Choose your country"), val => \$netc->{vpivci}, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'] }), if__($cnx->{dialing_mode}, { label => _("Dialing mode"), val => \$cnx->{dialing_mode},list=>["auto","manual"]}), if__($cnx->{speed}, { label => _("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"]}), if__($cnx->{huptimeout}, { label => _("Connection timeout (in sec)"), val => \$cnx->{huptimeout} }), @@ -89,9 +89,9 @@ sub ask_info2 { if__($cnx->{passwd}, { label => _("Account Password"), val => \$cnx->{passwd} }), ] ) or return; - if ($netc->{vcivpi}) { + if ($netc->{vpivci}) { foreach (['Netherlands', 8.48], ['France', 8.35], ['Belgium', 8.35], ['Italy', 8.35], ['UK', 0.38]) { - $netc->{vcivpi} eq $_->[0] and $netc->{vcivpi} = $_->[1] ; + $netc->{vpivci} eq $_->[0] and $netc->{vpivci} = $_->[1] ; } } 1; |