summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-09-10 10:19:26 +0000
committerFrancois Pons <fpons@mandriva.com>2003-09-10 10:19:26 +0000
commit3d9e279f9afd33decdb6430d1c1042e784299343 (patch)
tree00cc4f6e65b3976700eb549da62c9dc9af4fc1b3
parentb9a03fba6c89fc02883c06d0601b13d8e455dbff (diff)
downloaddrakx-3d9e279f9afd33decdb6430d1c1042e784299343.tar
drakx-3d9e279f9afd33decdb6430d1c1042e784299343.tar.gz
drakx-3d9e279f9afd33decdb6430d1c1042e784299343.tar.bz2
drakx-3d9e279f9afd33decdb6430d1c1042e784299343.tar.xz
drakx-3d9e279f9afd33decdb6430d1c1042e784299343.zip
added sagem support for dhcp (as used by Free degroupped ;-))
-rw-r--r--perl-install/network/adsl.pm27
1 files changed, 25 insertions, 2 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 2cb691fa9..de442248b 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -21,6 +21,9 @@ sub configure {
'dhcp' => N_("use dhcp"),
'speedtouch' => N_("Alcatel speedtouch usb") . if_($netc->{autodetect}{adsl}{speedtouch}, " - detected"),
'sagem' => N_("Sagem (using pppoa) usb") . if_($netc->{autodetect}{adsl}{sagem}, " - detected"),
+ if_($::expert, #- avoid clash with strings not translated but still add functionnalities...
+ 'sagem_dhcp' => N_("Sagem (using dhcp) usb") . if_($netc->{autodetect}{adsl}{sagem}, " - detected"),
+ ),
);
my $type = $in->ask_from_list_(N("Connect to the Internet"),
@@ -47,8 +50,8 @@ If you don't know, choose 'use pppoe'"),
adsl_conf($netcnx->{"adsl_$type"}, $netc, $intf, $type) or goto conf_adsl_step1;
}
if ($type =~ /Sagem/) {
- $type = 'sagem';
- $in->do_pkgs->install(qw(adiusbadsl));
+ $type = 'sagem' . ($type =~ /dhcp/ ? "_dhcp" : "");
+ $in->do_pkgs->install(qw(adiusbadsl), if_($type =~ /dhcp/, qw(dhcpcd)));
$netcnx->{type} = "adsl_$type";
$netcnx->{"adsl_$type"} = {};
adsl_conf($netcnx->{"adsl_$type"}, $netc, $intf, $type) or goto conf_adsl_step1;
@@ -163,6 +166,10 @@ defaultroute
}
if ($adsl_type eq 'sagem') {
+ substInFile {
+ s/VCI=.*\n/VCI=00000023\n/;
+ s/Encapsulation=.*\n/Encapsulation=00000006\n/;
+ } "$prefix/etc/analog/adiusbadsl";
output("$prefix/etc/ppp/peers/adsl",
qq(noauth
noipdefault
@@ -186,6 +193,13 @@ user "$adsl->{login}"
));
}
+ if ($adsl_type eq 'sagem_dhcp') {
+ substInFile {
+ s/VCI=.*\n/VCI=00000024\n/;
+ s/Encapsulation=.*\n/Encapsulation=00000004\n/;
+ } "$prefix/etc/analog/adiusbadsl";
+ }
+
if ($adsl_type eq 'speedtouch') {
my ($vpi, $vci) = $netc->{vpivci} =~ /(\d+)_(\d+)/ or return;
output("$prefix/etc/ppp/peers/adsl",
@@ -291,6 +305,15 @@ INTERFACE=`/usr/sbin/adictrl -i`
/usr/sbin/pppd file /etc/ppp/peers/adsl
',
'/usr/sbin/stopadsl
+', $netc->{adsltype}) } elsif ($adsl_type eq 'sagem_dhcp') {
+ write_cnx_script($netc, 'adsl',
+'/sbin/route del default
+/usr/sbin/adictrl -s
+INTERFACE=`/usr/sbin/adictrl -i`
+/sbin/dhcpcd $INTERFACE
+',
+'INTERFACE=`/usr/sbin/adictrl -i`
+/sbin/ifdown $INTERFACE
', $netc->{adsltype}) } elsif ($adsl_type eq 'eci') {
write_cnx_script($netc, 'adsl',
'/sbin/route del default