Subject: bin/3516: ypbind and rcp.yppasswdd do not always connect to server
To: None <>
From: Dave Burgess <>
List: netbsd-bugs
Date: 04/18/1997 21:35:51
>Number:         3516
>Category:       bin
>Synopsis:       ypbind and rcp.yppasswdd do not always connect to server
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 19:50:01 1997
>Originator:     Dave Burgess
Dave Burgess  (The man of a thousand E-Mail addresses)
>Release:        5 Apr 97

System: NetBSD 1.2D NetBSD 1.2D (CYNJUT) #2: 
Sat Apr 5 20:42:17 CST 1997 i386

Sometimes, when starting up a server which is the ypserver, the ypbind
and rpc.yppasswdd do not successfully connect to the local ypserv.  
It isn't a consistent problem; if the ypbind or rpc.yhppasswdd cannot
communicate with the server, they simply do not work.  If they are
non-responsive, killing the instance of the programs and restarting them
allows them to operate flawlessly until the next reboot.  Note that the
ypbind program will stop allowing the /etc/rc job to continue; an 
indication that a server was found (otherwise the boot process would 
hang waiting for the ypbind to find a host).  The problem is that the 
ypbind program cannot find the active (or perhaps correct) ypserver.
If the startup code pauses until the ypserver is fully started, the
problem is avoided.  In the /etc/rc file, I use the following to start
the services now:

if [ "X$ypbind_flags" != XNO ]; then
        echo -n ' ypbind';   ( sleep 5 ; ypbind $ypbind_flags ) &

if [ "X$yppasswdd_flags" != XNO ]; then
        echo -n ' rpc.yppasswdd'; (sleep 7 ; rpc.yppasswdd $yppasswdd_flags ) &

By postponing the ypbind start until after the ypserver has had a chance
to come up completely, the problem is avoided.  The reason for the sleep
7 is to avoid possible conflicts (however unfounded the fear) that the
yppasswdd and the ypbind might be causing a conflict through some
interaction.  Sleep 3 and 4 respectively might be enough to avoid the