summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-07-23 15:32:37 +0000
committerdamien <damien@mandriva.com>2001-07-23 15:32:37 +0000
commit1f286d60a33a4d5d1a5582e8815e7762f83802e7 (patch)
tree3ef4ed2c4876acaaf282e55d8aabbfe4c4e3af13
parente5b488774aac910be08e5a44407d0a87a228ee1a (diff)
downloaddrakx-backup-do-not-use-1f286d60a33a4d5d1a5582e8815e7762f83802e7.tar
drakx-backup-do-not-use-1f286d60a33a4d5d1a5582e8815e7762f83802e7.tar.gz
drakx-backup-do-not-use-1f286d60a33a4d5d1a5582e8815e7762f83802e7.tar.bz2
drakx-backup-do-not-use-1f286d60a33a4d5d1a5582e8815e7762f83802e7.tar.xz
drakx-backup-do-not-use-1f286d60a33a4d5d1a5582e8815e7762f83802e7.zip
isdn now works with isdn-light. Only 64kb/s and still some debuf stuff to be fixed.
-rw-r--r--perl-install/modules.pm5
-rw-r--r--perl-install/network/isdn.pm44
-rw-r--r--perl-install/network/isdn_consts.pm44
-rw-r--r--perl-install/network/netconnect.pm1
-rw-r--r--perl-install/network/tools.pm4
5 files changed, 62 insertions, 36 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index b11d87aa3..5892fca1b 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -471,6 +471,11 @@ sub get_options {
$conf{$name}{options};
}
+sub set_options {
+ my ($name, $new_option) = @_;
+ $conf{$name}{options} = $new_option;
+}
+
sub add_alias {
my ($alias, $name) = @_;
$name =~ /ignore/ and return;
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index f412e4d30..e8992b4ce 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -1,5 +1,6 @@
package network::isdn;
+use network::isdn_consts;
use common qw(:common :file :system);
use any;
use modules;
@@ -58,28 +59,20 @@ We recommand the light configuration.
1;
}
-#- isdn_write_config_backend : write isdn info, only for ippp0 -> ask_connect_now
-#- input :
-#- $isdn
-#- $light : boolean : if yes : uses the isdn-light package, if not, isdn4net
-#- $isdn input:
-#- $isdn->{login} $isdn->{passwd} $isdn->{phone_in} $isdn->{phone_out} $isdn->{dialing_mode}
-#- $isdn->{driver} $isdn->{type} $isdn->{irq} $isdn->{mem} $isdn->{io} $isdn->{io0} $isdn->{io1}
sub isdn_write_config_backend {
my ($isdn, $light) = @_;
if ($light) {
modules::mergein_conf("$prefix/etc/modules.conf");
- if ($netc->{autodetect}{isdn}{id}) {
+ if ($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::add_alias("ippp0", $isdn->{driver});
modules::set_options($isdn->{driver}, $a);
}
-
-
$::isStandalone and modules::write_conf($prefix);
foreach my $f ('ioptions1B', 'ioptions2B') {
substInFile { s/^name .*\n//; $_ .= "name $isdn->{login}\n" if eof } "$prefix/etc/ppp/$f";
@@ -87,8 +80,8 @@ sub isdn_write_config_backend {
}
foreach my $f ('isdn1B.conf', 'isdn2B.conf') {
substInFile {
- s/EAZ = .*\n/EAZ = $isdn->{phone_in}/;
- s/PHONE_OUT = .*\n/PHONE_OUT = $isdn->{phone_out}/;
+ s/EAZ =.*/EAZ = $isdn->{phone_in}/;
+ s/PHONE_OUT =.*/PHONE_OUT = $isdn->{phone_out}/;
} "$prefix/etc/isdn/$f";
chmod 0600, $f;
}
@@ -204,11 +197,10 @@ If you have a PCMCIA card, you have to know the irq and io of your card.
isdn_ask_step_2:
$e = $in->ask_from_listf(_("ISDN Configuration"),
- _("Which is your ISDN card ?"),
- sub { $_[0]{description} },
- [ grep {$_->{card} eq $isdn->{card_type}; } @network::netconnect::isdndata ] ) or goto isdn_ask_step_1;
- $isdn->{driver}='hisax';
- $e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(type mem io io0 io1 irq);
+ _("Which is your ISDN card ?"),
+ sub { $_[0]{description} },
+ [ grep {$_->{card} eq $isdn->{card_type}; } @isdndata ] ) or goto isdn_ask_step_1;
+ $e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq);
isdn_ask_step_3:
$isdn->{protocol} = isdn_ask_protocol() or goto isdn_ask_step_2;
@@ -239,12 +231,6 @@ sub isdn_detect {
1;
}
-#- isdn_detect_backend : detects isdn pci card and fills the infos in $isdn : only detects one card
-#- input
-#- $isdn
-#- $isdn output:
-#- $isdn->{description} $isdn->{vendor} $isdn->{id} $isdn->{driver} $isdn->{card_type} $isdn->{type}
-
sub isdn_detect_backend {
my ($isdn) = @_;
if (my ($c) = (modules::get_that_type('isdn'))) {
@@ -256,24 +242,16 @@ sub isdn_detect_backend {
modules::set_options($c->{driver}, $c->{options} . " protocol=" . $isdn->{protocol});
}
$c->{options} =~ /protocol=(\d)/ and $isdn->{protocol} = $1;
- print "plop " . $c->{options} . "\n";
}
}
-#- isdn_get_list : return isdn cards descriptions list. This function is not use internally.
-#- output : descriptions : list of strings
-
sub isdn_get_list {
- map { $_->{description} } @network::netconnect::isdndata;
+ map { $_->{description} } @isdndata;
}
-#- isdn_get_info : return isdn card infos. This function is not use internally.
-#- input : the description of the card (see isdn_get_list)
-#- output : a reference on the decription of the card. : ref on a hash(description,type,irq,mem,io,io0,io1card,)
-
sub isdn_get_info {
my ($desc) = @_;
- foreach (@network::netconnect::isdndata) {
+ foreach (@isdndata) {
return $_ if ($_->{description} eq $desc);
}
}
diff --git a/perl-install/network/isdn_consts.pm b/perl-install/network/isdn_consts.pm
index ceb241c50..09c52139f 100644
--- a/perl-install/network/isdn_consts.pm
+++ b/perl-install/network/isdn_consts.pm
@@ -3,6 +3,7 @@ package network::isdn; # $Id$
@isdndata =
(
{description => "Teles 16.0 (ISA)", #1 irq, mem, io
+ driver => 'hisax',
type => '1',
irq => '5',
mem => '0xd000',
@@ -10,24 +11,28 @@ package network::isdn; # $Id$
card => 'isa',
},
{description => "Teles 8.0 (ISA)", #2 irq, mem
+ driver => 'hisax',
type => '2',
irq => '9',
mem => '0xd800',
card => 'isa',
},
{description => "Teles 16.3 (ISA non PnP)", #3 irq, io
+ driver => 'hisax',
type => '3',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "Teles 16.3c (ISA PnP)", #14 irq, io
+ driver => 'hisax',
type => '14',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "Creatix/Teles (ISA PnP)", #4 irq, io0 (ISAC), io1 (HSCX)
+ driver => 'hisax',
type => '4',
irq => '5',
io0 => '0x0000',
@@ -35,127 +40,151 @@ package network::isdn; # $Id$
card => 'isa',
},
{description => "Teles generic (PCI)", #21 no parameter
+ driver => 'hisax',
type => '21',
card => 'pci',
},
{description => "Teles 16.3 (PCMCIA)", #8 irq, io
+ driver => 'hisax',
type => '8',
irq => '',
io => '0x',
card => 'isa',
},
{description => "Teles S0Box", #25 irq, io (of the used lpt port)
+ driver => 'hisax',
type => '25',
irq => '7',
io => '0x378',
card => 'isa',
},
{description => "ELSA PCC/PCF cards (ISA)", #6 io or nothing for autodetect (the io is required only if you have n>1 ELSA card )
+ driver => 'hisax',
type => '6',
io => "",
card => 'isa',
},
{description => "ELSA Quickstep 1000 (ISA)", #7 irq, io (from isapnp setup)
+ driver => 'hisax',
type => '7',
irq => '5',
io => '0x300',
card => 'isa',
},
{description => "ELSA Quickstep 1000 (PCI)", #18 no parameter
+ driver => 'hisax',
type => '18',
card => 'pci',
},
{description => "ELSA generic (PCMCIA)", #10 irq, io (set with card manager)
+ driver => 'hisax',
type => '10',
irq => '',
io => '0x',
card => 'isa',
},
{description => "ITK ix1-micro Rev.2 (ISA)", #9 irq, io
+ driver => 'hisax',
type => '9',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "Eicon.Diehl Diva (ISA PnP)", #11 irq, io
+ driver => 'hisax',
type => '11',
irq => '9',
io => '0x180',
card => 'isa',
},
{description => "Eicon.Diehl Diva (PCI)", #11 no parameter
+ driver => 'hisax',
type => '11',
card => 'pci',
},
{description => "ASUS COM ISDNLink (ISA)", #12 irq, io (from isapnp setup)
+ driver => 'hisax',
type => '12',
irq => '5',
io => '0x200',
card => 'isa',
},
{description => "ASUS COM ISDNLink (PCI)", #12
+ driver => 'hisax',
type => '35',
card => 'pci',
},
{description => "DynaLink (PCI)", #12
+ driver => 'hisax',
type => '12',
card => 'pci',
},
{description => "HFC-2BS0 based cards (ISA)", #13 irq, io
+ driver => 'hisax',
type => '13',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "HFC 2BDS0 (PCI)", #35 none
+ driver => 'hisax',
type => '35',
card => 'pci',
},
{description => "HFC 2BDS0 S+, SP (PCMCIA)", #37 irq,io (pcmcia must be set with cardmgr)
+ driver => 'hisax',
type => '37',
card => 'isa',
},
{description => "Sedlbauer Speed Card (ISA)", #15 irq, io
+ driver => 'hisax',
type => '15',
irq => '9',
io=> '0xd80',
card => 'isa',
},
{description => "Sedlbauer PC/104 (ISA)", #15 irq, io
+ driver => 'hisax',
type => '15',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "Sedlbauer Speed Card (PCI)", #15 no parameter
+ driver => 'hisax',
type => '15',
card => 'pci',
},
{description => "Sedlbauer Speed Star (PCMCIA)", #22 irq, io (set with card manager)
+ driver => 'hisax',
type => '22',
irq => '',
io => '0x',
card => 'isa',
},
{description => "Sedlbauer Speed Fax+ (ISA Pnp)", #28 irq, io (from isapnp setup)
+ driver => 'hisax',
type => '28',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "USR Sportster internal (ISA)", #16 irq, io
+ driver => 'hisax',
type => '16',
irq => '9',
io=> '0xd80',
card => 'isa',
},
{description => "MIC card (ISA)", #17 irq, io
+ driver => 'hisax',
type => '17',
irq => '9',
io => '0xd80',
card => 'isa',
},
{description => "Compaq ISDN S0 card (ISA)", #19 irq, io0, io1, io (from isapnp setup io=IO2)
+ driver => 'hisax',
type => '19',
irq => '5',
io => '0x0000',
@@ -164,10 +193,12 @@ package network::isdn; # $Id$
card => 'isa',
},
{description => "NETjet card (PCI)", #20 no parameter
+ driver => 'hisax',
type => '20',
card => 'pci',
},
{description => "Dr. Neuhaus Niccy (ISA PnP)", #24 irq, io0, io1 (from isapnp setup)
+ driver => 'hisax',
type => '24',
irq => '5',
io0 => '0x0000',
@@ -175,31 +206,37 @@ package network::isdn; # $Id$
card => 'isa',
},
{description => "Dr. Neuhaus Niccy (PCI)", ##24 no parameter
+ driver => 'hisax',
type => '24',
card => 'pci',
},
{description => "AVM A1 (Fritz!) (ISA non PnP)", #5 irq, io
+ driver => 'hisax',
type => '5',
irq => '10',
io => '0x300',
card => 'isa',
},
{description => "AVM (Fritz!) (ISA Pnp)", #27 irq, io (from isapnp setup)
+ driver => 'hisax',
type => '27',
irq => '5',
io => '0x300',
card => 'isa',
},
{description => "AVM A1 (Fritz!) (PCMCIA)", #26 irq, io (set with card manager)
+ driver => 'hisax',
type => '26',
irq => '',
card => 'isa',
},
{description => "AVM PCI (Fritz!) (PCI)", #27 no parameter
+ driver => 'hisax',
type => '27',
card => 'pci',
},
{description => "Siemens I-Surf 1.0 (ISA Pnp)", #29 irq, io, memory (from isapnp setup)
+ driver => 'hisax',
type => '29',
irq => '9',
io => '0xd80',
@@ -207,36 +244,43 @@ package network::isdn; # $Id$
card => 'isa',
},
{description => "ACER P10 (ISA Pnp)", #30 irq, io (from isapnp setup)
+ driver => 'hisax',
type => '30',
irq => '5',
io => '0x300',
card => 'isa',
},
{description => "HST Saphir (ISA Pnp)", #31 irq, io
+ driver => 'hisax',
type => '31',
irq => '5',
io => '0x300',
card => 'isa',
},
{description => "Telekom A4T (PCI)", #32 none
+ driver => 'hisax',
type => '32',
card => 'pci',
},
{description => "Scitel Quadro (PCI)", #33 subcontroller (4*S0, subctrl 1...4)
+ driver => 'hisax',
type => '33',
card => 'pci',
},
{description => "Gazel ISDN cards (ISA)", #34 irq,io
+ driver => 'hisax',
type => '34',
irq => '5',
io => '0x300',
card => 'isa',
},
{description => "Gazel ISDN cards (PCI)", #34 none
+ driver => 'hisax',
type => '34',
card => 'pci',
},
{description => "W6692 and Winbond based cards (PCI)", #36 none
+ driver => 'hisax',
type => '36',
card => 'pci',
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 47f4029ab..5d39df4c1 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -9,7 +9,6 @@ use common qw(:common :file :functional :system);
use log;
use detect_devices;
use run_program;
-use network::netconnect_consts;
use modules;
use any;
use mouse;
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index aff57e9b1..60dc94104 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -65,8 +65,8 @@ sub ask_info2 {
if__ ($cnx->{phone_in}, { label => _("Your personal phone number"), val => \$cnx->{phone_in} }),
if__ ($netc->{DOMAINNAME2}, { label => _("Provider name (ex provider.net)"), val => \$netc->{DOMAINNAME2} }),
if__ ($cnx->{phone_out}, { label => _("Provider phone number"), val => \$cnx->{phone_out} }),
- if__ ($netc->{dnsServer2}, { label => _("Provider dns 1"), val => \$netc->{dnsServer2} }),
- if__ ($netc->{dnsServer3}, { label => _("Provider dns 2"), val => \$netc->{dnsServer3} }),
+ 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->{login}, { label => _("Account Login (user name)"), val => \$cnx->{login} }),
if__ ($cnx->{passwd}, { label => _("Account Password"), val => \$cnx->{passwd} }),