All of lore.kernel.org
 help / color / mirror / Atom feed
From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ricci/init.d/ricci ricci/modules/cluster ...
Date: 5 Jul 2006 19:20:16 -0000	[thread overview]
Message-ID: <20060705192016.26547.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-07-05 19:20:15

Modified files:
	ricci/init.d   : ricci 
	ricci/modules/cluster/clumon/init.d: ricci-modclusterd 
	luci/init.d    : luci 

Log message:
	reload option; log start/stop

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/init.d/ricci.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/init.d/ricci-modclusterd.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/init.d/luci.diff?cvsroot=cluster&r1=1.4&r2=1.5

--- conga/ricci/init.d/ricci	2006/06/15 03:08:36	1.6
+++ conga/ricci/init.d/ricci	2006/07/05 19:20:14	1.7
@@ -23,6 +23,7 @@
 ID="ricci"
 RICCID="ricci"
 PIDFILE="/var/run/ricci.pid"
+LOCKFILE="/var/lock/subsys/ricci"
 RUNASUSER="ricci"
 
 #
@@ -44,6 +45,7 @@
 		    service messagebus status > /dev/null 2>&1
 		    if [ $? -ne 0 ]; then
 			echo "not starting ricci..."
+			/usr/bin/logger -t $RICCID "startup failed"
 			exit 1
 		    fi
 		fi
@@ -53,6 +55,7 @@
 		    service oddjobd status > /dev/null 2>&1
 		    if [ $? -ne 0 ]; then
 			echo "not starting ricci..."
+			/usr/bin/logger -t $RICCID "startup failed"
 			exit 1
 		    fi
 		fi
@@ -62,6 +65,12 @@
 		daemon $RICCID -u $NewUID
 		rtrn=$?
 		echo 
+		if [ $rtrn -eq 0 ]; then
+		    touch $LOCKFILE
+		    /usr/bin/logger -t $RICCID "startup succeeded"
+		else
+		    /usr/bin/logger -t $RICCID "startup failed"
+		fi
 		;;
 
         restart)
@@ -82,6 +91,10 @@
 		if [ $rtrn -eq 0 ]; then
 		    sleep 8
 		    rm -f $PIDFILE
+		    rm -f $LOCKFILE
+		    /usr/bin/logger -t $RICCID "shutdown succeeded"
+		else
+		    /usr/bin/logger -t $RICCID "shutdown failed"
 		fi
 		rtrn=0
 		echo 
@@ -94,8 +107,12 @@
 	       fi
 	       ;;
 
+        reload)
+               rtrn=0
+	       ;;
+
 	*)
-		echo $"Usage: $0 {start|stop|restart|status}"
+		echo $"Usage: $0 {start|stop|reload|restart|status}"
 		rtrn=1
 		;;
 
--- conga/ricci/modules/cluster/clumon/init.d/ricci-modclusterd	2006/04/12 15:47:09	1.3
+++ conga/ricci/modules/cluster/clumon/init.d/ricci-modclusterd	2006/07/05 19:20:15	1.4
@@ -26,6 +26,7 @@
 CLUMOND="ricci-modclusterd"
 CFG_FILE="/etc/cluster/cluster.conf"
 PIDFILE="/var/run/clumond.pid"
+LOCKFILE="/var/lock/subsys/clumond"
 
 #
 # Only root wants to run this...
@@ -44,6 +45,12 @@
 		echo -n $"Starting $ID: "
 		daemon $CLUMOND
 		rtrn=$?
+		if [ $rtrn -eq 0 ]; then
+		    touch $LOCKFILE
+		    /usr/bin/logger -t $CLUMOND "startup succeeded"
+		else
+		    /usr/bin/logger -t $CLUMOND "startup failed"
+		fi
 		echo
 		;;
 
@@ -63,6 +70,14 @@
 		echo -n "Shutting down $ID: "
 		killproc $CLUMOND SIGTERM
 		rtrn=$?
+		if [ $rtrn -eq 0 ]; then
+		    rm -f $PIDFILE
+		    rm -f $LOCKFILE
+		    /usr/bin/logger -t $CLUMOND "shutdown succeeded"
+		else
+		    /usr/bin/logger -t $CLUMOND "shutdown failed"
+		fi
+		rtrn=0
 		echo
 		;;
 
@@ -73,8 +88,12 @@
 	       fi
 	       ;;
 
+        reload)
+               rtrn=0
+	       ;;
+
 	*)
-		echo $"Usage: $0 {start|stop|restart|status}"
+		echo $"Usage: $0 {start|stop|reload|restart|status}"
 		rtrn=1
 		;;
 
--- conga/luci/init.d/luci	2006/06/16 23:14:34	1.4
+++ conga/luci/init.d/luci	2006/07/05 19:20:15	1.5
@@ -23,6 +23,8 @@
 ID="luci"
 LUCID="/var/lib/luci/bin/runzope"
 PIDFILE="/var/lib/luci/var/Z2.pid"
+GLOB_PIDFILE="/var/run/luci.pid"
+GLOB_LOCKFILE="/var/lock/subsys/luci"
 
 LUCI_USER="luci"
 LUCI_GROUP="luci"
@@ -157,8 +159,12 @@
 		rtrn=$?
 		if [ "1$rtrn" = "10" ] ; then
 		    echo_success
+		    cat $PIDFILE > $GLOB_PIDFILE
+		    touch $GLOB_LOCKFILE
+		    /usr/bin/logger -t $ID "startup succeeded"
 		else
 		    echo_failure
+		    /usr/bin/logger -t $ID "startup failed"
 		fi
 		echo 
 		;;
@@ -194,14 +200,21 @@
 		rtrn=$?
 		if [ "1$rtrn" = "10" ] ; then
 		    stop
+		    /usr/bin/logger -t $ID "shutdown succeeded"
 		fi
 		echo_success
+		rm -f $GLOB_PIDFILE
+		rm -f $GLOB_LOCKFILE
 		rtrn=0
 		echo 
 		;;
 
+        reload)
+               rtrn=0
+	       ;;
+
 	*)
-		echo $"Usage: $0 {start|stop|restart|status}"
+		echo $"Usage: $0 {start|stop|reload|restart|status}"
 		rtrn=1
 		;;
 



                 reply	other threads:[~2006-07-05 19:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060705192016.26547.qmail@sourceware.org \
    --to=kupcevic@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.