]> code.ossystems Code Review - openembedded-core.git/commitdiff
rpcbind: Fix rpcbind restart failure when rpcbind is not running
authorZhangle Yang <zhangle.yang@windriver.com>
Wed, 27 Nov 2013 14:00:21 +0000 (22:00 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 27 Nov 2013 14:28:28 +0000 (14:28 +0000)
"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".

Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/rpcbind/rpcbind/init.d

index 5c756bb5233aeb939b4280b1c592649c5781edeb..d418673aa0c080ebdd0397dd97c074a7c6b3fe2d 100644 (file)
@@ -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