]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: Avoid starting rpcbind daemon twice
authorYue Tao <Yue.Tao@windriver.com>
Fri, 25 May 2018 02:48:08 +0000 (10:48 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Jul 2018 09:40:32 +0000 (10:40 +0100)
Check the status before start it to avoid duplicates.

(From OE-Core rev: ca3ef7d1ef9b1f0dc4d3170b1ad20d5f725872a1)

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh

index fe6c19605f30c53229014b9933fd3285864f627d..be9f5970fa7a709d1e95e3445f8927f7a50dd501 100755 (executable)
@@ -67,9 +67,12 @@ if test "$rpcbind" = yes
 then
        if test -x /usr/sbin/rpcbind
        then
-               echo -n "Starting rpcbind... "
-               start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind
-               sleep 2
+               service rpcbind status > /dev/null
+               if [ $? != 0 ]; then
+                       echo -n "Starting rpcbind..."
+                       start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind
+                       sleep 2
+               fi
        fi
 fi