diff options
author | Mystery Man <unknown@mandriva.org> | 2002-07-09 13:18:50 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-07-09 13:18:50 +0000 |
commit | 061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf (patch) | |
tree | 6a497ebd94857616d1351e47418c0c3d6db4f563 /perl-install/network/modem.pm | |
parent | a6a904a31e39b74144c53f0cc4086d496b70c09a (diff) | |
download | drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar.gz drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar.bz2 drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar.xz drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_8_3mdk'.V1_1_8_3mdk
Diffstat (limited to 'perl-install/network/modem.pm')
-rw-r--r-- | perl-install/network/modem.pm | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm deleted file mode 100644 index 046ebbf8d..000000000 --- a/perl-install/network/modem.pm +++ /dev/null @@ -1,91 +0,0 @@ -package network::modem; - -use common; -use any; -use modules; -use detect_devices; -use mouse; -use network::tools; -use vars qw(@ISA @EXPORT); -use MDK::Common::Globals "network", qw($in $prefix); - -@ISA = qw(Exporter); -@EXPORT = qw(pppConfig modem_detect_backend); - -sub configure{ - my ($netcnx, $mouse, $netc) = @_; - $netcnx->{type}='modem'; - $netcnx->{$netcnx->{type}}={}; - $netcnx->{modem}{device}=$netc->{autodetect}{modem}; - modem_step_1: - pppConfig($netcnx->{$netcnx->{type}}, $mouse, $netc) or return; - write_cnx_script($netc, "modem", -q( -/sbin/route del default -ifup ppp0 -), -q(ifdown ppp0 -killall pppd -), $netcnx->{type}); - 1; -} - -sub pppConfig { - my ($modem, $mouse, $netc) = @_; - - $mouse ||={}; - $mouse->{device} ||= readlink "$prefix/dev/mouse"; - $::isInstall and $in->set_help('selectSerialPort'); - $modem->{device} ||= $in->ask_from_listf('', _("Please choose which serial port your modem is connected to."), - \&mouse::serial_port2text, - [ grep { $_ ne $mouse->{device} } (mouse::serial_ports, if_(-e '/dev/modem', '/dev/modem')) ]) || return; - - $::isStandalone || $in->set_help('configureNetworkISP'); - $in->ask_from('', _("Dialup options"), [ -{ label => _("Connection name"), val => \$modem->{connection} }, -{ label => _("Phone number"), val => \$modem->{phone} }, -{ label => _("Login ID"), val => \$modem->{login} }, -{ label => _("Password"), val => \$modem->{passwd}, hidden => 1 }, -{ label => _("Authentication"), val => \$modem->{auth}, list => [ __("PAP"), __("Terminal-based"), __("Script-based"), __("CHAP") ] }, -{ label => _("Domain name"), val => \$modem->{domain} }, -{ label => _("First DNS Server (optional)"), val => \$modem->{dns1} }, -{ label => _("Second DNS Server (optional)"), val => \$modem->{dns2} }, - ]) or return; - $netc->{DOMAINNAME2} = $modem->{domain}; - any::pppConfig($in, $modem, $prefix); - $netc->{$_}='ppp0' foreach 'NET_DEVICE', 'NET_INTERFACE'; - 1; -} -#-AT&F&O2B40 -#- DialString=ATDT0231389595(( - -#- modem_detect_backend : detects modem on serial ports and fills the infos in $modem : detects only one card -#- input -#- $modem -#- $mouse : facultative, hash containing device to exclude not to test mouse port : ( device => /ttyS[0-9]/ ) -#- output: -#- $modem->{device} : device where the modem were detected -sub modem_detect_backend { - my ($modem, $mouse) = @_; - $mouse ||={}; - $mouse->{device} ||= readlink "/dev/mouse"; - my $serdev = arch() =~ /ppc/ ? "macserial" : "serial"; - eval { modules::load("$serdev") }; - - detect_devices::probeSerialDevices(); - foreach ('modem', map { "ttyS$_" } (0..7)) { - next if $mouse->{device} =~ /$_/; - next unless -e "/dev/$_"; - detect_devices::hasModem("/dev/$_") and $modem->{device} = "$_", last; - } - - #- add an alias for macserial on PPC - modules::add_alias('serial', $serdev) if (arch() =~ /ppc/ && $modem->{device}); - my @devs = detect_devices::pcmcia_probe(); - foreach (@devs) { - $_->{type} =~ /serial/ and $modem->{device} = $_->{device}; - } - -} - -1; |