Wind River Support Network

HomeDefectsLIN5-5130
Fixed

LIN5-5130 : rpcbind started twice on boot

Created: Aug 28, 2013    Updated: Dec 19, 2017
Resolved Date: Oct 24, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.9
Severity: Severe
Applicable for: Wind River Linux 5
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.

Other Downloads


Live chat
Online