From e5b488774aac910be08e5a44407d0a87a228ee1a Mon Sep 17 00:00:00 2001 From: damien Date: Sun, 22 Jul 2001 23:04:06 +0000 Subject: updated isdn config, moved isdn_data from netconnect_const to isdn_const --- perl-install/network/isdn.pm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'perl-install/network/isdn.pm') diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index d921ee204..f412e4d30 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -69,9 +69,16 @@ sub isdn_write_config_backend { my ($isdn, $light) = @_; if ($light) { modules::mergein_conf("$prefix/etc/modules.conf"); - @c = any::setup_thiskind($in, 'isdn', !$::expert, 1); - modules::add_alias("ippp0", $c[0]{driver}); - isdn_detect_backend($isdn); + if ($netc->{autodetect}{isdn}{id}) { + @c = any::setup_thiskind($in, 'isdn', !$::expert, 1); + modules::add_alias("ippp0", $c[0]{driver}); + isdn_detect_backend($isdn); + } else { + my $a=""; + defined $isdn->{$_} and $a .= "$_=" . $isdn->{$_} . " " foreach qw(type protocol mem io io0 io1 irq); + modules::set_options($isdn->{driver}, $a); + } + $::isStandalone and modules::write_conf($prefix); foreach my $f ('ioptions1B', 'ioptions2B') { @@ -220,7 +227,6 @@ sub isdn_detect { isdn_ask($isdn, $netc, _("I have detected an ISDN PCI Card, but I don't know the type. Please select one PCI card on the next screen.")) or return; } else { isdn_detect_step_1: - print "plop isdn protocol\n"; $isdn->{protocol}=isdn_ask_protocol() or return; isdn_detect_step_2: isdn_ask_info($isdn, $netc) or goto isdn_detect_step_1; @@ -246,10 +252,11 @@ sub isdn_detect_backend { $isdn->{$_} = sprintf("%0x", $isdn->{$_}) foreach ('vendor', 'id'); $isdn->{card_type} = 'pci'; ($isdn->{type}) = $isdn->{options} =~ /type=(\d+)/; - if ($c->{options} !~ /protocol/ && $isdn->{protocol}) { - $c->{options} .= "protocol=" . $isdn->{protocol}; + if ($c->{options} !~ /protocol=/ && $isdn->{protocol} =~ /\d/) { + modules::set_options($c->{driver}, $c->{options} . " protocol=" . $isdn->{protocol}); } - $c->{options} =~ /protocol=(\w+)/ and $isdn->{protocol} = $1; + $c->{options} =~ /protocol=(\d)/ and $isdn->{protocol} = $1; + print "plop " . $c->{options} . "\n"; } } -- cgit v1.2.1