summaryrefslogtreecommitdiffstats
path: root/perl-install/network/isdn.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-07-22 23:04:06 +0000
committerdamien <damien@mandriva.com>2001-07-22 23:04:06 +0000
commite5b488774aac910be08e5a44407d0a87a228ee1a (patch)
treedd626dd28dfd3b70303943fe9bd226da7bdff843 /perl-install/network/isdn.pm
parent21d632055bbe913d53c3324d7465a38621d6d79e (diff)
downloaddrakx-backup-do-not-use-e5b488774aac910be08e5a44407d0a87a228ee1a.tar
drakx-backup-do-not-use-e5b488774aac910be08e5a44407d0a87a228ee1a.tar.gz
drakx-backup-do-not-use-e5b488774aac910be08e5a44407d0a87a228ee1a.tar.bz2
drakx-backup-do-not-use-e5b488774aac910be08e5a44407d0a87a228ee1a.tar.xz
drakx-backup-do-not-use-e5b488774aac910be08e5a44407d0a87a228ee1a.zip
updated isdn config, moved isdn_data from netconnect_const to isdn_const
Diffstat (limited to 'perl-install/network/isdn.pm')
-rw-r--r--perl-install/network/isdn.pm21
1 files changed, 14 insertions, 7 deletions
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";
}
}