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

Currently the function stop() always return 0 (OK) from killproc() even in case of error. Signed-off-by: Douglas Schilling Landgraf <dougsland@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 } -- 1.7.1

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@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@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Douglas Schilling Landgraf