summaryrefslogtreecommitdiffstats
path: root/perl-install/network/modem.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-29 12:16:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-29 12:16:30 +0000
commitbce59e8e1b55eb5ac91f30937a93aa290af40026 (patch)
treecb3f353ab8e94277f5d8efefafcbce1ba0ce686c /perl-install/network/modem.pm
parentae9b7c1acb33aacb50c8184a5588eeaf1b5b3399 (diff)
downloaddrakx-backup-do-not-use-bce59e8e1b55eb5ac91f30937a93aa290af40026.tar
drakx-backup-do-not-use-bce59e8e1b55eb5ac91f30937a93aa290af40026.tar.gz
drakx-backup-do-not-use-bce59e8e1b55eb5ac91f30937a93aa290af40026.tar.bz2
drakx-backup-do-not-use-bce59e8e1b55eb5ac91f30937a93aa290af40026.tar.xz
drakx-backup-do-not-use-bce59e8e1b55eb5ac91f30937a93aa290af40026.zip
- do not use a global $in in network::modem, pass it as a parameter
- create network::modem::ppp_configure_raw() which doesn't need $in (it is only used by network::modem::ppp_configure(), but this is clearer that way)
Diffstat (limited to 'perl-install/network/modem.pm')
-rw-r--r--perl-install/network/modem.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 3d75a5635..b277ccb56 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -6,11 +6,10 @@ use modules;
use detect_devices;
use mouse;
use network::tools;
-use MDK::Common::Globals "network", qw($in);
use Data::Dumper;
sub configure {
- my ($netcnx, $mouse, $netc, $intf) = @_;
+ my ($in, $netcnx, $mouse, $netc, $intf) = @_;
$netcnx->{type} = 'modem';
my $modem = $netcnx->{$netcnx->{type}};
# $netcnx->{$netcnx->{type}} = {};
@@ -33,7 +32,7 @@ sub configure {
last;
}
}
- ppp_choose($netc, $modem, $mouse) or return;
+ ppp_choose($in, $netc, $modem, $mouse) or return;
write_cnx_script($netc, "modem",
q(
/sbin/route del default
@@ -49,9 +48,13 @@ killall pppd
sub ppp_configure {
my ($in, $modem) = @_;
$modem or return;
+ $in->do_pkgs->install('ppp') if !$::testing;
+ ppp_configure_raw($modem);
+}
+sub ppp_configure_raw {
+ my ($modem) = @_;
any::devfssymlinkf($modem, 'modem') if $modem->{device} ne "/dev/modem";
- $in->do_pkgs->install('ppp') if !$::testing;
my %toreplace;
$toreplace{$_} = $modem->{$_} foreach qw(connection phone login passwd auth domain dns1 dns2);
@@ -211,7 +214,7 @@ END
}
sub ppp_choose {
- my ($netc, $modem, $mouse) = @_;
+ my ($in, $netc, $modem, $mouse) = @_;
$mouse ||= {};
$mouse->{device} ||= readlink "$::prefix/dev/mouse";
@@ -244,7 +247,7 @@ sub ppp_choose {
#- TODO: add choice between hcf/hsf
sub winmodemConfigure {
- my ($netc) = @_;
+ my ($in, $netc) = @_;
my $type;
foreach (keys %{$netc->{autodetect}{winmodem}}) {