Skip to contentSkip to conversation

rpcbind: Fix rpcbind restart failure when rpcbind is not running

PATCH New [email protected] 1 participant 1 message Nov 27, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpcbind: Fix rpcbind restart failure when rpcbind is not running

From: Zhangle Yang <[email protected]>

"rpcbind restart" executes stop and then start function. However, if rpcbind is not started, "exit 0" shall be run in stop function, so start function will not be run at all. This patch changes "exit 0" to "return 0".

---
 meta/recipes-extended/rpcbind/rpcbind/init.d | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/rpcbind/rpcbind/init.d +1 -1
index 5c756bb..d418673 100644
@@ -47,7 +47,7 @@ stop ()
     echo "Stopping rpcbind daemon..."
     if ! pidof /sbin/rpcbind >/dev/null; then
         echo "not running."
-        exit 0
+        return 0
     fi
     start-stop-daemon --stop --quiet --exec /sbin/rpcbind
     if [ $? -eq 0 ]; then
Signature · 1 line
1.8.1.2