incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core] Correct service status reporting in Fedora
Date Wed, 14 Sep 2011 09:01:24 GMT
On Sep 14, 2011, at 7:50 AM, Richard Su wrote:

ACK.

Do you have Apache CLA signed? If yes, I can push it now otherwise you should
create a JIRA ticket and add this patch as attachment.

 -- Michal

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

----------------------------------------------------------------------
Michal Fojtik, Senior Software Engineer, Red Hat Czech
mfojtik@redhat.com
Deltacloud API: http://deltacloud.org


Mime
View raw message