From 6a83cd72792a38c4956c76ff95be54fcda32f710 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Sat, 18 Jan 2014 23:37:05 -0800 Subject: [PATCH 1/1] run.sh: fix -status command exit codes Currently -status command exits with exit code 0 to represent both 'running' and 'not running' state when pidfile is found and -1 when pidfile is not found (likely not running). Overloading exit code 0 makes wrapper scripts incapable of differentiating 'running' from 'not running.' Make 0 == running, 1 == not running, and -1 likely not running. Change-Id: Ic258ab34e03ae1777b00bab75d1cfe30bc6c90da Signed-off-by: Chris Wright --- .../distribution/opendaylight/src/main/resources/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendaylight/distribution/opendaylight/src/main/resources/run.sh b/opendaylight/distribution/opendaylight/src/main/resources/run.sh index 1f3e8e20f3..90e3b03ae4 100755 --- a/opendaylight/distribution/opendaylight/src/main/resources/run.sh +++ b/opendaylight/distribution/opendaylight/src/main/resources/run.sh @@ -190,7 +190,7 @@ if [ "${statusdaemon}" -eq 1 ]; then else echo "Controller with PID: ${daemonpid} -- Doesn't seem to exist" rm -f "${pidfile}" - exit 0 + exit 1 fi else echo "Doesn't seem any Controller daemon is currently running, at least no PID file has been found" -- 2.36.6