* [Cluster-devel] conga/ricci/modules/cluster/clumon/init.d modc ...
@ 2007-10-22 19:26 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2007-10-22 19:26 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-10-22 19:26:54
Modified files:
ricci/modules/cluster/clumon/init.d: modclusterd
Log message:
Better LSB compliance
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/init.d/modclusterd.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1
--- conga/ricci/modules/cluster/clumon/init.d/modclusterd 2006/10/14 18:52:23 1.2
+++ conga/ricci/modules/cluster/clumon/init.d/modclusterd 2007/10/22 19:26:54 1.2.2.1
@@ -1,8 +1,8 @@
#!/bin/sh
#
-# Copyright (C) 2005 Red Hat, Inc.
+# Copyright (C) 2005-2007 Red Hat, Inc.
#
-# This program is Free Software. You may modify and/or redistribute it under
+# This program is Free Software. You may modify and/or redistribute it under
# the terms of the GNU General Public License version 2, or (at your option)
# any later version.
#
@@ -31,12 +31,12 @@
#
# Only root wants to run this...
#
-[ `id -u` = 0 ] || exit 0
+[ `id -u` = 0 ] || exit 4
#
# If we're not configured, then don't start anything.
#
-[ "${NETWORKING}" = "yes" ] || exit 0
+[ "${NETWORKING}" = "yes" ] || exit 1
#[ -f "$CFG_FILE" ] || exit 0
@@ -46,57 +46,57 @@
daemon $MODCLUSTERD
rtrn=$?
if [ $rtrn -eq 0 ]; then
- touch $LOCKFILE
- /usr/bin/logger -t $MODCLUSTERD "startup succeeded"
+ touch $LOCKFILE
+ /usr/bin/logger -t $MODCLUSTERD "startup succeeded"
else
- /usr/bin/logger -t $MODCLUSTERD "startup failed"
+ /usr/bin/logger -t $MODCLUSTERD "startup failed"
+ rtrn=1
fi
echo
- ;;
+ ;;
restart)
$0 stop
sleep 8
- $0 start
+ $0 start
rtrn=$?
- ;;
+ ;;
status)
status $MODCLUSTERD
rtrn=$?
- ;;
+ ;;
stop)
echo -n "Shutting down $ID: "
killproc $MODCLUSTERD SIGTERM
rtrn=$?
if [ $rtrn -eq 0 ]; then
- rm -f $PIDFILE
- rm -f $LOCKFILE
- /usr/bin/logger -t $MODCLUSTERD "shutdown succeeded"
+ rm -f $PIDFILE
+ rm -f $LOCKFILE
+ /usr/bin/logger -t $MODCLUSTERD "shutdown succeeded"
else
- /usr/bin/logger -t $MODCLUSTERD "shutdown failed"
+ /usr/bin/logger -t $MODCLUSTERD "shutdown failed"
+ rtrn=1
fi
- rtrn=0
echo
- ;;
+ ;;
- condrestart)
- if [ -f ${PIDFILE} ] ; then
- $0 restart
- rtrn=$?
- fi
- ;;
-
- reload)
- rtrn=0
- ;;
+ condrestart)
+ if [ -f ${PIDFILE} ] ; then
+ $0 restart
+ rtrn=$?
+ fi
+ ;;
+
+ reload)
+ rtrn=3
+ ;;
*)
echo $"Usage: $0 {start|stop|reload|restart|status}"
- rtrn=1
- ;;
-
+ rtrn=3
+ ;;
esac
exit $rtrn
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] conga/ricci/modules/cluster/clumon/init.d modc ...
@ 2007-09-20 4:50 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2007-09-20 4:50 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-09-20 04:50:02
Modified files:
ricci/modules/cluster/clumon/init.d: modclusterd
Log message:
Tweak exit failure codes to be more LSB-compliant.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/init.d/modclusterd.diff?cvsroot=cluster&r1=1.3&r2=1.4
--- conga/ricci/modules/cluster/clumon/init.d/modclusterd 2007/09/11 02:45:27 1.3
+++ conga/ricci/modules/cluster/clumon/init.d/modclusterd 2007/09/20 04:50:01 1.4
@@ -1,8 +1,8 @@
#!/bin/sh
#
-# Copyright (C) 2005 Red Hat, Inc.
+# Copyright (C) 2005-2007 Red Hat, Inc.
#
-# This program is Free Software. You may modify and/or redistribute it under
+# This program is Free Software. You may modify and/or redistribute it under
# the terms of the GNU General Public License version 2, or (at your option)
# any later version.
#
@@ -31,12 +31,12 @@
#
# Only root wants to run this...
#
-[ `id -u` = 0 ] || exit 0
+[ `id -u` = 0 ] || exit 4
#
# If we're not configured, then don't start anything.
#
-[ "${NETWORKING}" = "yes" ] || exit 0
+[ "${NETWORKING}" = "yes" ] || exit 1
#[ -f "$CFG_FILE" ] || exit 0
@@ -46,57 +46,57 @@
daemon $MODCLUSTERD
rtrn=$?
if [ $rtrn -eq 0 ]; then
- touch $LOCKFILE
- /usr/bin/logger -t $MODCLUSTERD "startup succeeded"
+ touch $LOCKFILE
+ /usr/bin/logger -t $MODCLUSTERD "startup succeeded"
else
- /usr/bin/logger -t $MODCLUSTERD "startup failed"
+ /usr/bin/logger -t $MODCLUSTERD "startup failed"
+ rtrn=1
fi
echo
- ;;
+ ;;
restart)
$0 stop
sleep 8
$0 start
rtrn=$?
- ;;
+ ;;
status)
status $MODCLUSTERD
rtrn=$?
- ;;
+ ;;
stop)
echo -n "Shutting down $ID: "
killproc $MODCLUSTERD SIGTERM
rtrn=$?
if [ $rtrn -eq 0 ]; then
- rm -f $PIDFILE
- rm -f $LOCKFILE
- /usr/bin/logger -t $MODCLUSTERD "shutdown succeeded"
+ rm -f $PIDFILE
+ rm -f $LOCKFILE
+ /usr/bin/logger -t $MODCLUSTERD "shutdown succeeded"
else
- /usr/bin/logger -t $MODCLUSTERD "shutdown failed"
+ /usr/bin/logger -t $MODCLUSTERD "shutdown failed"
+ rtrn=1
fi
- rtrn=0
echo
- ;;
+ ;;
- condrestart)
- if [ -f ${PIDFILE} ] ; then
- $0 restart
- rtrn=$?
- fi
- ;;
-
- reload)
- rtrn=0
- ;;
+ condrestart)
+ if [ -f ${PIDFILE} ] ; then
+ $0 restart
+ rtrn=$?
+ fi
+ ;;
+
+ reload)
+ rtrn=3
+ ;;
*)
echo $"Usage: $0 {start|stop|reload|restart|status}"
- rtrn=1
- ;;
-
+ rtrn=3
+ ;;
esac
exit $rtrn
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] conga/ricci/modules/cluster/clumon/init.d modc ...
@ 2006-10-14 18:52 kupcevic
0 siblings, 0 replies; 3+ messages in thread
From: kupcevic @ 2006-10-14 18:52 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-10-14 18:52:23
Modified files:
ricci/modules/cluster/clumon/init.d: modclusterd
Log message:
modclusterd: init script: use correct PIDFILE
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/init.d/modclusterd.diff?cvsroot=cluster&r1=1.1&r2=1.2
--- conga/ricci/modules/cluster/clumon/init.d/modclusterd 2006/08/09 20:53:22 1.1
+++ conga/ricci/modules/cluster/clumon/init.d/modclusterd 2006/10/14 18:52:23 1.2
@@ -23,9 +23,9 @@
export PATH
ID="Cluster Module - cluster monitor"
-CLUMOND="modclusterd"
+MODCLUSTERD="modclusterd"
CFG_FILE="/etc/cluster/cluster.conf"
-PIDFILE="/var/run/clumond.pid"
+PIDFILE="/var/run/modclusterd.pid"
LOCKFILE="/var/lock/subsys/modclusterd"
#
@@ -43,13 +43,13 @@
case $1 in
start)
echo -n $"Starting $ID: "
- daemon $CLUMOND
+ daemon $MODCLUSTERD
rtrn=$?
if [ $rtrn -eq 0 ]; then
touch $LOCKFILE
- /usr/bin/logger -t $CLUMOND "startup succeeded"
+ /usr/bin/logger -t $MODCLUSTERD "startup succeeded"
else
- /usr/bin/logger -t $CLUMOND "startup failed"
+ /usr/bin/logger -t $MODCLUSTERD "startup failed"
fi
echo
;;
@@ -62,20 +62,20 @@
;;
status)
- status $CLUMOND
+ status $MODCLUSTERD
rtrn=$?
;;
stop)
echo -n "Shutting down $ID: "
- killproc $CLUMOND SIGTERM
+ killproc $MODCLUSTERD SIGTERM
rtrn=$?
if [ $rtrn -eq 0 ]; then
rm -f $PIDFILE
rm -f $LOCKFILE
- /usr/bin/logger -t $CLUMOND "shutdown succeeded"
+ /usr/bin/logger -t $MODCLUSTERD "shutdown succeeded"
else
- /usr/bin/logger -t $CLUMOND "shutdown failed"
+ /usr/bin/logger -t $MODCLUSTERD "shutdown failed"
fi
rtrn=0
echo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-22 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 19:26 [Cluster-devel] conga/ricci/modules/cluster/clumon/init.d modc rmccabe
-- strict thread matches above, loose matches on Subject: below --
2007-09-20 4:50 rmccabe
2006-10-14 18:52 kupcevic
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 NNTP newsgroup(s).