diff options
author | damien <damien@mandriva.com> | 2001-07-30 15:54:38 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-07-30 15:54:38 +0000 |
commit | 6c8dd68e7062a96d88a59cc128ac01ec28490a97 (patch) | |
tree | d4c1185a4853d53381e83894cd8f3b673495bd58 /perl-install/network/tools.pm | |
parent | 7aab173af2151843199dc229641f643538c8c161 (diff) | |
download | drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.gz drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.bz2 drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.xz drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.zip |
added internet connection selection in case of multiple configurations
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r-- | perl-install/network/tools.pm | 13 |
1 files changed, 11 insertions, 2 deletions
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") { |