summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/isdn.pm76
1 files changed, 1 insertions, 75 deletions
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 0709338e8..9bb855c5c 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -14,7 +14,7 @@ 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_backend isdn_get_list isdn_get_info read_providers_backend);
+@EXPORT = qw(get_info_providers_backend isdn_detect_backend isdn_get_info isdn_get_list isdn_write_config isdn_write_config_backend read_providers_backend);
sub isdn_write_config {
@@ -124,80 +124,6 @@ sub get_info_providers_backend {
sub read_providers_backend { map { /(.*?)=>/ } catMaybeCompressed($file) }
-sub isdn_ask_info {
- my ($isdn, $netc) = @_;
- my $f = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db";
- $f = "$::prefix$f" if !-e $f;
- isdn_ask_info_step1:
- my $str = $in->ask_from_treelist(N("ISDN Configuration"), N("Select your provider.\nIf it isn't listed, choose Unlisted."),
- '|', ['Unlisted - edit manually',
- read_providers_backend($f)], 'Unlisted - edit manually')
- or return;
- get_info_providers_backend($isdn, $netc, $str || 'Unlisted - edit manually', $f);
- $isdn->{huptimeout} = 180;
- $isdn->{$_} ||= '' foreach qw(phone_in phone_out dialing_mode login passwd passwd2 idl speed);
- add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' });
- ask_info2($isdn, $netc) or goto isdn_ask_info_step1;
-}
-
-sub isdn_ask_protocol() {
- my @toto = (
- { description => $::expert ? N("European protocol (EDSS1)") : N("European protocol"),
- protokol => 2 },
- { description => $::expert ? N("Protocol for the rest of the world\nNo D-Channel (leased lines)") : N("Protocol for the rest of the world"),
- protokol => 3 }
- );
- my $e = $in->ask_from_listf(N("ISDN Configuration"),
- N("Which protocol do you want to use?"),
- sub { $_[0]{description} },
- \@toto) or return 0;
- $e->{protokol};
-}
-
-sub isdn_ask {
- my ($isdn, $netc, $label) = @_;
-
- #- ISDN card already detected
- if (!$::expert && defined $netc->{autodetect}{isdn}{card_type}) {
- $in->ask_yesorno(N("ISDN Configuration"), N("Found \"%s\" interface do you want to use it ?", $netc->{autodetect}{isdn}{description}), 1) or return;
- $isdn->{$_} = $netc->{autodetect}{isdn}{$_} foreach qw(description vendor id card_type driver type mem io io0 io1 irq firmware);
- goto isdn_ask_step_3;
- }
-
- isdn_ask_step_1:
- my $e = $in->ask_from_list_(N("ISDN Configuration"),
- $label . "\n" . N("What kind of card do you have?"),
- [ N_("ISA / PCMCIA"), N_("PCI"), N_("USB"), N_("I don't know") ]
- ) or return;
- isdn_ask_step_1b:
- if ($e =~ /PCI/) {
- $isdn->{card_type} = 'pci';
- } elsif ($e =~ /USB/) {
- $isdn->{card_type} = 'usb';
- } else {
- $in->ask_from_list_(N("ISDN Configuration"),
- N("
-If you have an ISA card, the values on the next screen should be right.\n
-If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
-"),
- [ N_("Continue"), N_("Abort") ]) eq 'Continue' or goto isdn_ask_step_1;
- $isdn->{card_type} = 'isa';
- }
-
- isdn_ask_step_2:
- $e = $in->ask_from_listf(N("ISDN Configuration"),
- N("Which of the following is your ISDN card?"),
- sub { $_[0]{description} },
- [ grep { $_->{card} eq $isdn->{card_type} } @isdndata ]) or goto($isdn->{card_type} =~ /usb|pci/ ? 'isdn_ask_step_1' : 'isdn_ask_step_1b');
- $e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq firmware);
-
- isdn_ask_step_3:
- $isdn->{protocol} = isdn_ask_protocol() or goto isdn_ask_step_2;
- isdn_ask_step_4:
- isdn_ask_info($isdn, $netc) or goto isdn_ask_step_3;
- isdn_write_config($isdn, $netc) or goto isdn_ask_step_4;
- 1;
-}
sub isdn_detect_backend() {
my @isdn;