[libvirt] [PATCH] libvirtd.init.in: stop/restart() - wrong return value in case of fail

Daniel Veillard veillard at redhat.com
Mon Aug 15 07:46:21 UTC 2011


On Sat, Aug 13, 2011 at 11:28:42PM -0400, Douglas Schilling Landgraf wrote:
> Currently the function stop() always return 0 (OK) from killproc() even in case of
> error.
> 
> Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
> ---
>  daemon/libvirtd.init.in |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in
> index aa7870c..0697a2b 100644
> --- a/daemon/libvirtd.init.in
> +++ b/daemon/libvirtd.init.in
> @@ -76,6 +76,8 @@ stop() {
>          rm -f @localstatedir@/lock/subsys/$SERVICE
>          rm -f $PIDFILE
>          rm -rf @localstatedir@/cache/libvirt/*
> +    else
> +        exit $RETVAL
>      fi
>  }

  ACK, I also added you to the AUTHORS file with the sending address :-)

   thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list