summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2002-10-10 15:33:11 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2002-10-10 15:33:11 +0000
commit396d3cdd5194e36408347554458ee2692d2aac8e (patch)
tree35e090cfa9fb1ee8e81844e54c0e22051d78269c /perl-install/network
parente9491d2b93aa715d67e8901a5dc240ad0617c0f4 (diff)
downloaddrakx-backup-do-not-use-396d3cdd5194e36408347554458ee2692d2aac8e.tar
drakx-backup-do-not-use-396d3cdd5194e36408347554458ee2692d2aac8e.tar.gz
drakx-backup-do-not-use-396d3cdd5194e36408347554458ee2692d2aac8e.tar.bz2
drakx-backup-do-not-use-396d3cdd5194e36408347554458ee2692d2aac8e.tar.xz
drakx-backup-do-not-use-396d3cdd5194e36408347554458ee2692d2aac8e.zip
notify if speedtouch is detected or not
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm22
1 files changed, 9 insertions, 13 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 301598f11..a1a50e932 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -20,10 +20,16 @@ sub configure {
# _("The most common way to connect with adsl is pppoe.
# Some connections use pptp, a few ones use dhcp.
# If you don't know, choose 'use pppoe'"), [__("use pppoe"), __("use pptp"), __("use dhcp"), __("Alcatel speedtouch usb"), __("ECI Hi-Focus")]) or return;
+ my @l = (
+ [__("use pppoe"),
+ __("use pptp"),
+ __("use dhcp"),
+ __("Alcatel speedtouch usb") . if_($netc->{autodetect}{adsl}{speedtouch}, " - detected")]
+ );
my $type = $in->ask_from_list_(_("Connect to the Internet"),
_("The most common way to connect with adsl is pppoe.
Some connections use pptp, a few ones use dhcp.
-If you don't know, choose 'use pppoe'"), [__("use pppoe"), __("use pptp"), __("use dhcp"), __("Alcatel speedtouch usb")]) or return;
+If you don't know, choose 'use pppoe'"), @l) or return;
$type =~ s/use //;
if ($type eq 'pppoe') {
$in->do_pkgs->install("rp-$type");
@@ -74,19 +80,9 @@ sub adsl_ask_info {
ask_info2($adsl, $netc);
}
-#- adsl_detect : detect adsl modem on a given interface
-#- input :
-#- $interface : interface where the modem is supposed to be connected : should be "ethx"
-#- output:
-#- true/false : success|failed
sub adsl_detect {
- return 0;
- my ($interface) = @_;
- run_program::rooted($prefix, "ifconfig $interface 10.0.0.10 netmask 255.255.255.0");
- my $ret = run_program::rooted($prefix, "/bin/ping -c 1 10.0.0.138 2> /dev/null");
- run_program::rooted($prefix, "ifconfig $interface 0.0.0.0 netmask 255.255.255.0");
- run_program::rooted($prefix, "/etc/init.d/network restart");
- $ret;
+ my ($adsl) = @_;
+ $adsl->{speedtouch} = detect_devices::getSpeedtouch();
}
sub adsl_conf {