From 6c8dd68e7062a96d88a59cc128ac01ec28490a97 Mon Sep 17 00:00:00 2001 From: damien Date: Mon, 30 Jul 2001 15:54:38 +0000 Subject: added internet connection selection in case of multiple configurations --- perl-install/network/tools.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'perl-install/network/tools.pm') diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 6cf4f8f3a..851569e6d 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -3,12 +3,21 @@ package network::tools; use common; use run_program; use vars qw(@ISA @EXPORT); -use MDK::Common::Globals "network", qw($in $prefix $install $disconnect_file $connect_prog); +use MDK::Common::Globals "network", qw($in $prefix $install $disconnect_file $connect_prog $connect_file $disconnect_file); @ISA = qw(Exporter); -@EXPORT = qw(write_secret_backend ask_connect_now connect_backend disconnect_backend read_providers_backend ask_info2 connected disconnected); +@EXPORT = qw(write_cnx_script write_secret_backend ask_connect_now connect_backend disconnect_backend read_providers_backend ask_info2 connected disconnected); @EXPORT_OK = qw($in); +sub write_cnx_script { + my($netc, $type, $up, $down) = @_; + $type or output ("$prefix$_", $netc->{internet_cnx}{$netc->{internet_cnx_choice}}{$_}) foreach ($connect_file, $disconnect_file); + foreach ([$connect_file, $up], [$disconnect_file, $down]) { + $netc->{internet_cnx}{$type}{$_->[0]}=$_->[1]; + chmod 0755, "$prefix" . $_->[0]; + } +} + sub write_secret_backend { my ($a, $b) = @_; foreach my $i ("pap-secrets", "chap-secrets") { -- cgit v1.2.1