diff mbox

[opensm] opensm.init.in: Fix return value checking in opensm.init script

Message ID 53BA7147.8030605@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock July 7, 2014, 10:07 a.m. UTC
From: Daniel Klein <danielk@mellanox.com>

Fix return value checks when calling stop and start functions

Signed-off-by: Daniel Klein <danielk@mellanox.com>
---
 scripts/opensm.init.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/scripts/opensm.init.in b/scripts/opensm.init.in
index d2d1a71..700a32b 100644
--- a/scripts/opensm.init.in
+++ b/scripts/opensm.init.in
@@ -80,6 +80,7 @@  start () {
     fi
     echo -n "Starting opensm: "
     @sbindir@/opensm --daemon --pidfile $pidfile $OPTIONS > /dev/null
+    RETVAL=$?
     if [[ $RETVAL -eq 0 ]]; then
         success
     else
@@ -91,6 +92,7 @@  start () {
 stop () {
     echo -n "Shutting down opensm: "
     killproc opensm
+    RETVAL=$?
     if [[ $RETVAL -eq 0 ]]; then
         success
     else