[icinga-checkins] icinga.org: icinga-core/mbecker/test: replace echo -n by printf in init scripts (Lars Engels) #834

git at icinga.org git at icinga.org
Thu Sep 30 10:11:25 CEST 2010


Module: icinga-core
Branch: mbecker/test
Commit: c744c59fb3badd4a82dcac52374b018969425672
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=c744c59fb3badd4a82dcac52374b018969425672

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Sep 30 08:54:10 2010 +0200

replace echo -n by printf in init scripts (Lars Engels) #834

fixes #834

---

 Changelog      |    1 +
 daemon-init.in |   10 +++++-----
 rc.ido2db.in   |    6 +++---
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Changelog b/Changelog
index 9b2f851..5d01523 100644
--- a/Changelog
+++ b/Changelog
@@ -50,6 +50,7 @@ FIXES
 * install: add mkdir -p for HTTPDCONF directory creation instead of install -D (misses on Unix) #802
 * install: remove installing from ido2db init script from Makefile when installing idoutils #814
 * install: better ssl detection in solaris when /usr/local/ssl used for --with-ssl #821
+* install: replace echo -n by printf in init scripts (Lars Engels) #834
 
 * config: fix typo preserve_state_information in description of retention file
 
diff --git a/daemon-init.in b/daemon-init.in
index 9dfee79..bf06c53 100644
--- a/daemon-init.in
+++ b/daemon-init.in
@@ -58,7 +58,7 @@ pid_icinga ()
 
 chk_config ()
 {
-	echo -n "Running configuration check..."
+	printf "Running configuration check..."
 	$IcingaBin -v $IcingaCfgFile > $IcingaChkFile 2>&1
 	if test $? -ne 0; then
 		if test -z "$1"; then
@@ -125,7 +125,7 @@ start(){
 		fi
 	fi
 
-	echo -n "Starting icinga: "
+	printf "Starting icinga: "
 	rm -f $IcingaCommandFile
 	touch $IcingaRunFile
 	chown $IcingaUser:$IcingaGroup $IcingaRunFile
@@ -145,7 +145,7 @@ case "$1" in
 		;;
 
 	stop)
-		echo -n "Stopping icinga: "
+		printf "Stopping icinga: "
 
 		pid_icinga
 		killproc_icinga icinga
@@ -155,10 +155,10 @@ case "$1" in
  		# happen, and then the exiting icinga will remove the
  		# new IcingaRunFile, allowing multiple icinga daemons
  		# to (sooner or later) run - John Sellens
-		#echo -n 'Waiting for icinga to exit .'
+		#printf 'Waiting for icinga to exit .'
  		for i in 1 2 3 4 5 6 7 8 9 10 ; do
  		    if status_icinga > /dev/null; then
- 			echo -n '.'
+ 			printf '.'
  			sleep 1
  		    else
  			break
diff --git a/rc.ido2db.in b/rc.ido2db.in
index f201010..9ebeb39 100644
--- a/rc.ido2db.in
+++ b/rc.ido2db.in
@@ -145,7 +145,7 @@ case "$1" in
 				rm -f $Ido2dbStatusFile $Ido2dbRunFile $Ido2dbLockDir/$Ido2dbLockFile $Ido2dbCommandFile
 			fi
 		fi
-		echo -n "Starting $servicename:"
+		printf "Starting $servicename:"
 		touch $Ido2dbRunFile
 		chown $Ido2dbUser:$Ido2dbGroup $Ido2dbRunFile
 		$Ido2dbBin -c $Ido2dbCfgFile
@@ -155,7 +155,7 @@ case "$1" in
 		;;
 
 	stop)
-		echo -n "Stopping $servicename: "
+		printf "Stopping $servicename: "
 
 		pid_ido2db 
 		killproc_ido2db ido2db
@@ -167,7 +167,7 @@ case "$1" in
  		# to (sooner or later) run - John Sellens
  		for i in 1 2 3 4 5 6 7 8 9 10 ; do
  		    if status_ido2db > /dev/null; then
- 			echo -n '.'
+ 			printf '.'
  			sleep 1
  		    else
  			break





More information about the icinga-checkins mailing list