Commit 2a565b2c authored by Max Kanat-Alexander's avatar Max Kanat-Alexander Committed by Frédéric Buclin

Bug 556195: bugzilla-queue.rhel initscript returns wrong result code when the daemon isn't running

r=justdave a=LpSolit
parent b3a503ab
......@@ -70,7 +70,7 @@ usage ()
start ()
{
if [ -f "$PIDFILE" ]; then
checkpid `cat $PIDFILE` && return 0
checkpid `cat $PIDFILE` && return 2
fi
echo -n "Starting $NAME: "
touch $PIDFILE
......@@ -85,7 +85,7 @@ start ()
stop ()
{
[ -f /var/lock/subsys/$NAME ] || return 0
[ -f /var/lock/subsys/$NAME ] || return 2
echo -n "Killing $NAME: "
killproc $NAME
echo
......@@ -100,7 +100,7 @@ restart ()
condrestart ()
{
[ -e /var/lock/subsys/$NAME ] && restart || return 0
[ -e /var/lock/subsys/$NAME ] && restart || return 2
}
......@@ -110,7 +110,7 @@ case "$1" in
status) $BIN -p $PIDFILE -n $NAME check; RETVAL=$?;;
restart) restart; RETVAL=$? ;;
condrestart) condrestart; RETVAL=$? ;;
*) usage ; RETVAL=2 ;;
*) usage ;;
esac
exit $RETVAL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment