Wind River Support Network

HomeDefectsLIN6-3419
Fixed

LIN6-3419 : rpcbind started twice on boot

Created: Aug 28, 2013    Updated: Mar 5, 2016
Resolved Date: Nov 26, 2013
Previous ID: LIN5-5140, LIN6-2828
Found In Version: 6.0
Fix Version: 6.0
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: Userspace

Description

From Boot logs:

Configuring network interfaces... ifup: interface lo already configured done.
Starting rpcbind daemon...done.
Starting rpcbind...Mounting remote filesystems...


From target:
 # ls -l /etc/rcS.d/S43rpcbind
lrwxrwxrwx 3 root root 17 Aug 28 07:57 /etc/rcS.d/S43rpcbind -> ../init.d/rpcbind

But mountnfs also start rpcbind:
# ls -l  /etc/rcS.d/S45mountnfs.sh
lrwxrwxrwx 3 root root 21 Aug 28 07:57 /etc/rcS.d/S45mountnfs.sh -> ../init.d/mountnfs.sh

from /etc/init.d/mountfs.sh

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

Workaround

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
index 79f0f82..351a7ca 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
@@ -69,9 +69,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
+		if
 	fi
 fi

Steps to Reproduce

$ configure --enable-board=qemux86-64 --enable-rootfs=glibc_cgl --enable-kernel=cgl
$ make

Examine the startup scripts and you can see that rpcbind can be started twice.
Live chat
Online