From 6b10ec022394629689724cf153f48fe6268500d1 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: May 15 2013 13:58:09 +0000 Subject: fix return code from init script (#962937) --- diff --git a/nut.spec b/nut.spec index 467735d..65f4c5a 100644 --- a/nut.spec +++ b/nut.spec @@ -13,7 +13,7 @@ Summary: Network UPS Tools Name: nut Version: 2.6.5 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System License: GPLv2+ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -382,6 +382,9 @@ rm -rf %{buildroot} %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed May 15 2013 Michal Hlavinka - 2.6.5-2 +- fix return code from init script (#962937) + * Fri Aug 10 2012 Michal Hlavinka - 2.6.5-1 - updated to 2.6.5 diff --git a/ups.init b/ups.init index 1fe9449..9e56429 100644 --- a/ups.init +++ b/ups.init @@ -59,6 +59,7 @@ start() { else echo -n $"Starting UPS monitor (slave): " daemon /usr/sbin/upsmon > /dev/null 2>&1 && success || failure + RETVAL=$? echo fi @@ -68,13 +69,16 @@ start() { stop() { echo -n $"Stopping UPS monitor: " killproc upsmon + RETVAL=$? echo if [ "$SERVER" = "yes" ]; then prog="upsd" echo -n $"Stopping $prog: " killproc upsd > /dev/null 2>&1 && success || failure - RETVAL=$? + if [ "$RETVAL" = 0 ]; then + RETVAL=$? + fi echo echo -n $"Shutting down upsdrvctl: "