[icinga-checkins] icinga.org: icinga-core/r1.6: change position of the IcingaPid param declaration to make sure is populated before used .

git at icinga.org git at icinga.org
Wed Nov 9 16:43:14 CET 2011


Module: icinga-core
Branch: r1.6
Commit: 4504357eae98d90396d9a62948cacc34b09b0538
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=4504357eae98d90396d9a62948cacc34b09b0538

Author: Assaf Flatto <icinga at flatto.net>
Date:   Fri Nov  4 13:35:16 2011 +0000

change position of the IcingaPid param declaration to make sure is populated before used.

---

 daemon-init.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/daemon-init.in b/daemon-init.in
index e0c2170..3c0f02e 100644
--- a/daemon-init.in
+++ b/daemon-init.in
@@ -95,6 +95,7 @@ kill9proc_icinga()
 
 pid_icinga ()
 {
+    IcingaPID=`head -n 1 $IcingaRunFile`
 
 	if test ! -f $IcingaRunFile; then
 		echo "Icinga not running. No lock file found in $IcingaRunFile"
@@ -109,7 +110,7 @@ pid_icinga ()
         fi
         exit 1
 
-	IcingaPID=`head -n 1 $IcingaRunFile`
+	
 }
 
 





More information about the icinga-checkins mailing list