summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-09 20:34:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-09 20:34:28 +0000
commit9d2a27b9b8faace1e9a643f5d53785195f06ec8b (patch)
tree0b2c1998f534b1352ee52df1355d7aef4a85f88a /perl-install/network
parent85a0902976afe6974a03338c79ccb1246989c42d (diff)
downloaddrakx-9d2a27b9b8faace1e9a643f5d53785195f06ec8b.tar
drakx-9d2a27b9b8faace1e9a643f5d53785195f06ec8b.tar.gz
drakx-9d2a27b9b8faace1e9a643f5d53785195f06ec8b.tar.bz2
drakx-9d2a27b9b8faace1e9a643f5d53785195f06ec8b.tar.xz
drakx-9d2a27b9b8faace1e9a643f5d53785195f06ec8b.zip
- do not use q{...} to please perl_checker
- use <<'EOF' instead - at the same time, fix the "\n" at the beginning of the generated script
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/tools.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 2b9a4448f..6929a7630 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -223,8 +223,7 @@ sub disconnected { }
sub write_initscript {
- output ("$prefix/etc/rc.d/init.d/internet",
- q{
+ output ("$prefix/etc/rc.d/init.d/internet", sprintf(<<'EOF', $connect_file, $connect_file, $disconnect_file, $disconnect_file));
#!/bin/bash
#
# internet Bring up/down internet connection
@@ -239,16 +238,16 @@ sub write_initscript {
case "$1" in
start)
- if [ -e } . $connect_file . q{ ]; then
- action "Checking internet connections to start at boot" "} . "$connect_file --boot_time" . q{"
+ if [ -e %s ]; then
+ action "Checking internet connections to start at boot" "%s --boot_time"
else
action "No connection to start" "true"
fi
touch /var/lock/subsys/internet
;;
stop)
- if [ -e } . $disconnect_file . q{ ]; then
- action "Stopping internet connection if needed: " "} . "$disconnect_file --boot_time" . q{"
+ if [ -e %s ]; then
+ action "Stopping internet connection if needed: " "%s --boot_time"
else
action "No connection to stop" "true"
fi
@@ -267,7 +266,7 @@ sub write_initscript {
exit 1
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