summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-09-12 17:15:36 +0000
committerdamien <damien@mandriva.com>2001-09-12 17:15:36 +0000
commit8fbd7ec2b17cefc2ab1edbd728fddb98bcadc480 (patch)
tree6a2715954bbbf868954eef75da6abcc3cfc7ee26 /perl-install/network/tools.pm
parentba0a8f74db346c94fb64f0a246c7e42ceb6a4982 (diff)
downloaddrakx-backup-do-not-use-8fbd7ec2b17cefc2ab1edbd728fddb98bcadc480.tar
drakx-backup-do-not-use-8fbd7ec2b17cefc2ab1edbd728fddb98bcadc480.tar.gz
drakx-backup-do-not-use-8fbd7ec2b17cefc2ab1edbd728fddb98bcadc480.tar.bz2
drakx-backup-do-not-use-8fbd7ec2b17cefc2ab1edbd728fddb98bcadc480.tar.xz
drakx-backup-do-not-use-8fbd7ec2b17cefc2ab1edbd728fddb98bcadc480.zip
new default connection handling
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 9fede9a88..8acd00396 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -10,14 +10,18 @@ use MDK::Common::Globals "network", qw($in $prefix $disconnect_file $connect_pro
@EXPORT_OK = qw($in);
sub write_cnx_script {
- my ($netc, $type, $up, $down) = @_;
- $type or output ("$prefix$_",
+ my ($netc, $type, $up, $down, $type2) = @_;
+ if ($type) {
+ $netc->{internet_cnx}{$type}{$_->[0]}=$_->[1] foreach ([$connect_file, $up], [$disconnect_file, $down]);
+ $netc->{internet_cnx}{$type}{type} = $type2;
+ } else {
+ foreach ($connect_file, $disconnect_file) {
+ output ("$prefix$_",
'#!/bin/bash
' . if_(!$netc->{at_boot}, 'if [ "x$1" == "x--boot_time" ]; then exit; fi
-') . $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];
+') . $netc->{internet_cnx}{$netc->{internet_cnx_choice}}{$_});
+ chmod 0755, "$prefix" . $_;
+ }
}
}