initscripts: Avoid starting rpcbind daemon twice

Check the status before start it to avoid duplicates.

(From OE-Core rev: ca3ef7d1ef9b1f0dc4d3170b1ad20d5f725872a1)

(From OE-Core rev: 2f3faa2d80a2d848fe18fc375628b69a1ca4ee52)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Yue Tao
2018-05-25 10:48:08 +08:00
committed by Richard Purdie
parent 4b173dcf7c
commit 67f4c5d1b6

View File

@@ -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