[icinga-checkins] icinga.org: icinga-core/aflatto/ido: adapting script to use internal bash functions

git at icinga.org git at icinga.org
Mon Apr 15 22:44:58 CEST 2013


Module: icinga-core
Branch: aflatto/ido
Commit: ccd7f7b992be8529c7ce45cc51c65a995a995ea8
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=ccd7f7b992be8529c7ce45cc51c65a995a995ea8

Author: Assaf Flatto <icinga at flatto.net>
Date:   Mon Apr 15 21:43:49 2013 +0100

adapting script to use internal bash functions

---

 rc.ido2db.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rc.ido2db.in b/rc.ido2db.in
index 7fe8be7..2639574 100644
--- a/rc.ido2db.in
+++ b/rc.ido2db.in
@@ -105,7 +105,7 @@ status_ido2db ()
 ido2db_procs ()
 {
         PCHILD=`$PS --no-headers --ppid  "$Ido2dbPID" | /usr/bin/wc -l`
-        PID_LIST=`$PS --no-headers --ppid  "$Ido2dbPID"| /bin/awk {'print $1'} | /usr/bin/tr '\n' ','`
+        PID_LIST=`$PS --no-headers --ppid  "$Ido2dbPID"| cut -c 1-6 | /usr/bin/tr '\n' ','`
 }
 
 
@@ -115,7 +115,7 @@ printstatus_ido2db()
      if status_ido2db $1 $2; then
         ido2db_procs
 	echo "$servicename (pid $Ido2dbPID) is running with $PCHILD child procs ${PID_LIST%?}."
-	elif test $? -eq 2; then # this command will fail on solaris the "==" needed to be replaced with "-eq"
+	elif test $? -eq 2; then 
 		echo "$servicename is not running but subsystem locked"
 	else
 		echo "$servicename is not running"





More information about the icinga-checkins mailing list