RH 6.0, upgraded from Mandrake 5.3
On system startup, in the file /etc/rc.d/init.d/ypbind called with argument
'start' the ypbind daemon only connects to the servrer, which is up at the
moment the ypbind daemon is run. The delay loop added afterwards
does not cause the ypbbind daemon to retry.
(a) force running ypbind daemon to reread it's configuration and retry
search for master,
(b) increase the time between the retries or the number of retries, or both.
Please, find below the appropriate excerpt from my corrected file.
I expressely grant you the right to use this code section in your
distribution without any obligation on your part.
case "$1" in
echo -n "Binding to the NIS domain... "
# the following fixes problems with the init scripts continuing
# even when we are really not bound yet to a server, and then things
# that need NIS fail.
if [ -n "$pid" ]; then
echo -n "Listening for an NIS domain server: "
until ypwhich > /dev/null 2>&1 || [ "$times" = "20" ]
echo -n "." ;
kill -HUP $pid # <--- added correction
if [ $exit_code = 0 ]
echo " connection failed"
# Makes no sense to run ypbind w/o the server
The delay isn't for it to retry; if the server's not there, the
server's not there.
It's for waiting to make sure that it's actually bound to
a server; if the connection is timing out, telling it to
try again isn't going to help.
Or am I misunderstanding what you're saying?
In a synchronized startup of a cluster (or any network) with some NIS
server and some clients it may be reasonable for the slave to wait.
This is the case I have in my installation.
I have a cluster wich is turned on by just one power switch. The
clients usually boot faster than the NIS server and they need to
wait the additional few seconds.
Also, even with the server running, the ypbind did not always succeed
in connecting. Adding the forced config reread for ypbind seems to
have fixed the problem for me.
if you set ypbind to breadcast for an NIS server it will keep retrying every 30
seconds to bind to a new server.