summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-02 20:41:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-02 20:41:44 +0000
commit9519d51eb29b0a5881bc859e1c2b9b3b3a8abfa6 (patch)
tree61aeae2581a101186add4569667ddac27876bd0e /perl-install/network/tools.pm
parent5ea5e381f9840d127fe444d8eecf34be4c45d0e6 (diff)
downloaddrakx-9519d51eb29b0a5881bc859e1c2b9b3b3a8abfa6.tar
drakx-9519d51eb29b0a5881bc859e1c2b9b3b3a8abfa6.tar.gz
drakx-9519d51eb29b0a5881bc859e1c2b9b3b3a8abfa6.tar.bz2
drakx-9519d51eb29b0a5881bc859e1c2b9b3b3a8abfa6.tar.xz
drakx-9519d51eb29b0a5881bc859e1c2b9b3b3a8abfa6.zip
use output_with_perm()
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 55c8b8a89..48809e8ef 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -18,11 +18,10 @@ sub write_cnx_script {
$netc->{internet_cnx}{$type}{type} = $type2;
} else {
foreach ($connect_file, $disconnect_file) {
- output("$prefix$_",
+ output_with_perm("$prefix$_", 0755,
'#!/bin/bash
' . if_(!$netc->{at_boot}, 'if [ "x$1" == "x--boot_time" ]; then exit; fi
') . $netc->{internet_cnx}{$netc->{internet_cnx_choice}}{$_});
- chmod 0755, "$prefix$_";
}
}
}
@@ -223,7 +222,8 @@ sub disconnected {}
sub write_initscript {
- output("$prefix/etc/rc.d/init.d/internet", sprintf(<<'EOF', $connect_file, $connect_file, $disconnect_file, $disconnect_file));
+ output_with_perm("$prefix/etc/rc.d/init.d/internet", 0755,
+ sprintf(<<'EOF', $connect_file, $connect_file, $disconnect_file, $disconnect_file));
#!/bin/bash
#
# internet Bring up/down internet connection
@@ -267,7 +267,6 @@ sub write_initscript {
esac
exit 0
EOF
- chmod 0755, "$prefix/etc/rc.d/init.d/internet";
$::isStandalone ? system("/sbin/chkconfig --add internet") : do {
symlinkf("../init.d/internet", "$prefix/etc/rc.d/rc$_") foreach
'0.d/K11internet', '1.d/K11internet', '2.d/K11internet', '3.d/S89internet', '5.d/S89internet', '6.d/K11internet';