[Cluster-devel] conga ricci/init.d/ricci ricci/modules/cluster ...

kupcevic at sourceware.org kupcevic at sourceware.org
Wed Jul 5 19:20:16 UTC 2006


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
 		;;
 




More information about the Cluster-devel mailing list