summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-08-03 23:24:26 +0000
committerdamien <damien@mandriva.com>2001-08-03 23:24:26 +0000
commit8892216863adeda2e8cfd199d016ab9141f8e401 (patch)
treeb2eb193e432cd77012a78f46478b563a527720e4 /perl-install/network
parente43d7789133b955e73f15118ebc8926478e97e59 (diff)
downloaddrakx-backup-do-not-use-8892216863adeda2e8cfd199d016ab9141f8e401.tar
drakx-backup-do-not-use-8892216863adeda2e8cfd199d016ab9141f8e401.tar.gz
drakx-backup-do-not-use-8892216863adeda2e8cfd199d016ab9141f8e401.tar.bz2
drakx-backup-do-not-use-8892216863adeda2e8cfd199d016ab9141f8e401.tar.xz
drakx-backup-do-not-use-8892216863adeda2e8cfd199d016ab9141f8e401.zip
debugging, 128Kb/s ISDN
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/isdn.pm13
-rw-r--r--perl-install/network/netconnect.pm2
-rw-r--r--perl-install/network/tools.pm12
3 files changed, 14 insertions, 13 deletions
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 658f7d24a..fd96f10c2 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -10,7 +10,7 @@ use log;
use network::tools;
use vars qw(@ISA @EXPORT);
use MDK::Common::Globals "network", qw($in $prefix $install);
-
+use MDK::Common::File;
@ISA = qw(Exporter);
@EXPORT = qw(isdn_write_config isdn_write_config_backend get_info_providers_backend isdn_ask_info isdn_ask_protocol isdn_ask isdn_detect isdn_detect_backend isdn_get_list isdn_get_info);
@@ -52,14 +52,14 @@ sub isdn_write_config {
We recommand the light configuration.
"), [ __("New configuration (isdn-light)"), __("Old configuration (isdn4net)")]
- ) or return;
- my ($rmpackage, $instpackage) = $e =~ /light/ ? ('isdn4net', 'isdn-light') : ('isdn4net', 'isdn-light');
+ ) or return;
+ my ($rmpackage, $instpackage) = $e =~ /light/ ? ('isdn4net', 'isdn-light') : ('isdn-light', 'isdn4net');
if (!$::isStandalone) {
my $p = pkgs::packageByName($in->{packages}, $rmpackage);
$p && pkgs::packageFlagSelected($p) and pkgs::unselectPackage($in->{packages}, $p);
}
run_program::rooted($prefix, "rpm", "-e", "$rmpackage");
- $install->($instpackage, 'isdn4k-utils');
+ $install->($instpackage, if_($isdn->{speed} =~ /128/, 'ibod'), 'isdn4k-utils');
isdn_write_config_backend($isdn, $e =~ /light/, $netc);
1;
}
@@ -89,6 +89,9 @@ sub isdn_write_config_backend {
} "$prefix/etc/isdn/$f";
chmod 0600, $f;
}
+ my $bundle = $isdn->{speed} =~ /64/ ? "1B" : "2B";
+ symlinkf("isdn" . $bundle . ".conf", "$prefix/etc/isdn/isdnctrl.conf");
+ symlinkf("ioptions" . $bundle, "$prefix/etc/ppp/ioptions");
} else {
my $f = "$prefix/etc/isdn/profile/link/myisp";
output $f,
@@ -161,7 +164,7 @@ sub isdn_ask_info {
read_providers_backend($f)], 'Unlisted - edit manually')
or return;
get_info_providers_backend($isdn, $netc, $str || 'Unlisted - edit manually', $f);
- $isdn->{$_} ||= '' foreach qw(phone_in phone_out dialing_mode login passwd passwd2 idl);
+ $isdn->{$_} ||= '' foreach qw(phone_in phone_out dialing_mode login passwd passwd2 idl speed);
add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' });
ask_info2($isdn, $netc);
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 92e3ab0c7..56aa7919a 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -147,7 +147,7 @@ ifdown eth0
my $set_default;
my %conf;
- $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach qw(modem adsl cable lan);
+ $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach 'modem', 'adsl', 'cable', 'lan';
$conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1: 0;
my @l = (
[_("Normal modem connection"), $netc->{autodetect}{modem}, __("detected on port %s"), \$conf{modem}],
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index f76782251..b88382fb7 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -28,12 +28,9 @@ sub write_secret_backend {
sub ask_connect_now {
$::Wizard_no_previous=1;
#- FIXME : code the exception to be generated by ask_yesorno, to be able to remove the $::Wizard_no_previous=1;
- my $a;
- eval { $a = $in->ask_yesorno(_("Internet configuration"),
- _("Do you want to try to connect to the Internet now?")
- ) };
- return 0 if $@;
- if ($a) {
+ if ($in->ask_yesorno(_("Internet configuration"),
+ _("Do you want to try to connect to the Internet now?")
+ )) {
my $up;
{
my $w = $in->wait_message('', _("Testing your connection..."), 1);
@@ -81,7 +78,8 @@ 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__ ($cnx->{dialing_mode}, { label => _("Dialing mode"), val => \$cnx->{dialing_mode}, list => [ "auto", "manual"] }),
+ 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->{login}, { label => _("Account Login (user name)"), val => \$cnx->{login} }),
if__ ($cnx->{passwd}, { label => _("Account Password"), val => \$cnx->{passwd} }),
]