From 9d2a27b9b8faace1e9a643f5d53785195f06ec8b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 9 Nov 2002 20:34:28 +0000 Subject: - 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 --- perl-install/network/tools.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'perl-install') 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 -- cgit v1.2.1