incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Su <r...@redhat.com>
Subject [PATCH core] Correct service status reporting in Fedora
Date Wed, 14 Sep 2011 05:50:22 GMT
service deltacloud-core status was returning the usage information
because $PROG should be $prog.

puppet was not seeing the correct status because $retval was not
being returned with exit.

clalance recommended the exec command be in quotes.
---
 server/support/fedora/deltacloud-core |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/support/fedora/deltacloud-core b/server/support/fedora/deltacloud-core
index b336c01..5a8ee43 100755
--- a/server/support/fedora/deltacloud-core
+++ b/server/support/fedora/deltacloud-core
@@ -44,7 +44,7 @@ start() {
     [ -x $exec ] || exit 5
 
     echo -n $"Starting $prog: "
-    daemon --user nobody $exec -i $DRIVER -e $API_ENV --port $PORT >> $LOGFILE 2>&1
&
+    daemon --user nobody "$exec -i $DRIVER -e $API_ENV --port $PORT >> $LOGFILE 2>&1
&"
     retval=$?
 
     if [ $retval -eq 0 ] && touch $lockfile ; then
@@ -88,7 +88,7 @@ case "$1" in
       restart
       ;;
     status)
-      status $PROG
+      status $prog
       retval=$?
       ;;
     *)
@@ -97,4 +97,4 @@ case "$1" in
   ;;
 esac
 
-exit $?
+exit $retval
-- 
1.7.6


Mime
View raw message