diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-21 09:35:44 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-21 09:35:44 +0000 |
commit | 3507800100da6fde08167f34d6e685fbe36e2948 (patch) | |
tree | b9893f4be82dfa52db8f6e079745dee84a48064d | |
parent | a2fc2a36a5261bca7eacfeb8e5deba4905e98f06 (diff) | |
download | drakx-backup-do-not-use-3507800100da6fde08167f34d6e685fbe36e2948.tar drakx-backup-do-not-use-3507800100da6fde08167f34d6e685fbe36e2948.tar.gz drakx-backup-do-not-use-3507800100da6fde08167f34d6e685fbe36e2948.tar.bz2 drakx-backup-do-not-use-3507800100da6fde08167f34d6e685fbe36e2948.tar.xz drakx-backup-do-not-use-3507800100da6fde08167f34d6e685fbe36e2948.zip |
don't use global $in (fix ISDN configuration)
-rw-r--r-- | perl-install/network/adsl.pm | 6 | ||||
-rw-r--r-- | perl-install/network/isdn.pm | 9 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 6 |
3 files changed, 10 insertions, 11 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index ca0b0e272..4c0a62dd4 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -308,9 +308,9 @@ user "$net->{adsl}{login}" if ($adsl_type eq "capi") { require network::isdn; - network::isdn::setup_capi_conf($net->{adsl}{capi_card}); - services::disable('isdn4linux'); - services::enable('capi4linux'); + network::isdn::setup_capi_conf($in, $net->{adsl}{capi_card}); + services::disable('isdn4linux'); + services::enable('capi4linux'); #- install and run drdsl for dsl connections, once capi driver is loaded $in->do_pkgs->ensure_is_installed_if_available("drdsl", "/usr/sbin/drdsl"); diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index 766769504..740741b16 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -7,12 +7,11 @@ use modules; use run_program; use log; use network::tools; -use MDK::Common::Globals "network", qw($in); use services; sub write_config { - my ($isdn) = @_; + my ($in, $isdn) = @_; $in->do_pkgs->install('isdn4net', if_($isdn->{speed} =~ /128/, 'ibod'), 'isdn4k-utils'); output_with_perm("$::prefix/etc/isdn/profile/link/myisp", 0600, @@ -47,7 +46,7 @@ defaultroute services::stop("isdn4linux"); #- to be stopped before capi is loaded if ($isdn->{driver} eq "capidrv") { - setup_capi_conf(get_capi_card($isdn)); + setup_capi_conf($in, get_capi_card($in, $isdn)); services::enable('capi4linux'); } else { services::disable('capi4linux'); @@ -61,7 +60,7 @@ defaultroute sub setup_capi_conf { - my ($capi_card) = @_; + my ($in, $capi_card) = @_; $in->do_pkgs->ensure_is_installed('isdn4k-utils', "/etc/rc.d/init.d/capi4linux"); #- capi4linux service is_module_installed($capi_card->{driver}) or $in->do_pkgs->install(@{$capi_card->{packages}}); @@ -176,7 +175,7 @@ sub is_module_installed { sub get_capi_card { - my ($isdn) = @_; + my ($in, $isdn) = @_; my $capi_card = find { hex($isdn->{vendor}) == $_->{vendor} && hex($isdn->{id}) == $_->{id}; diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 059b9e1ec..41db9df62 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -302,7 +302,7 @@ sub real_main { ]; }, post => sub { - network::isdn::write_config($isdn); + network::isdn::write_config($in, $isdn); $net->{net_interface} = 'ippp0'; "allow_user_ctl"; }, @@ -366,7 +366,7 @@ sub real_main { $isdn->{driver} = $isdn_cards{$isdn_name}{driver}; #- do not let config overwrite default driver #- let the user choose hisax or capidrv if both are available - $isdn->{driver} ne "capidrv" && network::isdn::get_capi_card($isdn) and return "isdn_driver"; + $isdn->{driver} ne "capidrv" && network::isdn::get_capi_card($in, $isdn) and return "isdn_driver"; return "isdn_protocol"; }, }, @@ -652,7 +652,7 @@ Take a look at http://www.linmodems.org"), detect($modules_conf, $net->{autodetect}, 'isdn'); if (my @isdn_modems = @{$net->{autodetect}{isdn}}) { require network::isdn; - %isdn_cards = map { $_->{description} => $_ } grep { $_->{driver} =~ /dsl/i } map { network::isdn::get_capi_card($_) } @isdn_modems; + %isdn_cards = map { $_->{description} => $_ } grep { $_->{driver} =~ /dsl/i } map { network::isdn::get_capi_card($in, $_) } @isdn_modems; push @adsl_devices, keys %isdn_cards; } }, |