initscripts: Avoid starting rpcbind daemon twice

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>
This commit is contained in:
Yue Tao
2018-05-25 10:48:08 +08:00
committed by Richard Purdie
parent 5256f95d55
commit c9fc9110be

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