public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - cman notify: add logging to cman_notify
@ 2008-11-04  7:56 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2008-11-04  7:56 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3fec6e6edb042158be584d6eeb40e478a54835e0
Commit:        3fec6e6edb042158be584d6eeb40e478a54835e0
Parent:        ff328079523f4df2e1623c87850aacbb41d469f7
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Tue Nov 4 08:54:30 2008 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Nov 4 08:54:30 2008 +0100

cman notify: add logging to cman_notify

save information on what we are doing when executing scripts.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 cman/notifyd/cman_notify.in |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/cman/notifyd/cman_notify.in b/cman/notifyd/cman_notify.in
index 5afda60..86d848b 100644
--- a/cman/notifyd/cman_notify.in
+++ b/cman/notifyd/cman_notify.in
@@ -10,9 +10,10 @@ if [ ! -d "@NOTIFYDDIR@" ]; then
 fi
 
 OUT="/dev/null 2>&1"
+LOGFILE="@LOGDIR@/cman_notify.log"
 
 if [ "$CMAN_NOTIFICATION_DEBUG" = "1" ]; then
-	OUT="@LOGDIR@/cman_notify.log"
+	OUT="$LOGFILE"
 fi
 
 # Ignore *~ and *, scripts
@@ -29,7 +30,11 @@ for i in $(LC_ALL=C; echo @NOTIFYDIR@/*[^~,]); do
 	[ "${i%.dpkg-dist}" != "${i}" ] && continue
 	[ "${i%.dpkg-new}" != "${i}" ] && continue
 
-	[ -x $i ] && $i > $OUT
+	if [ -x $i ]; then
+		echo "starting $(basename $i)" > $LOGFILE
+		$i > $OUT
+		echo "finished $(basename $i)" > $LOGFILE
+	fi
 done
 
 exit 0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-04  7:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-04  7:56 master - cman notify: add logging to cman_notify Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).