Description of problem: Our lab is full of irritating ethernet switches that take half a minute to wake up once the computer's interface is brought up. The observable effect of this is that it takes about half a minute for NIS servers to respond when the computer is booted up. For Fedora 9 we need NISTIMEOUT set to something over 60 (because the init script assumes "ypwhich" takes 15 seconds whereas it appears to be somewhat faster than that - related bug 430409). However, it still doesn't always work because there is a race condition in the ypbind init script which means that NISTIMEOUT is not always used. The instruction "timeout=$NISTIMEOUT" in the init script is dependent upon the condition failure==1. This in turn is set when "rpcinfo -p" indicates that ypbind hasn't started up yet. However, if the daemon is fast enough to start up before the loop executes for the first time then this will never happen, and the timeout value actually used is hardcoded to 10, which means our NIS servers never get the chance to respond before the script times out and shuts down the ypbind service. This was also a problem on Fedora 8, but we more-or-less skipped that release and so didn't notice. Fedora 7 always uses the given NISTIMEOUT value and thus works fine. Version-Release number of selected component (if applicable): ypbind-1.20.4-4.fc9.x86_64
Created attachment 305944 [details] Suggested fix for ypbind init script issues This could be fixed by renaming "failure" to something more descriptive (e.g., "firsttime"), setting it to 1 before the loop instead of 0, and not setting it in the "wait for ypbind to get started" section. In addition, something real-time based (as suggested in bug 430489) should be used instead of the current hack. Since the script currently runs in /bin/bash this is as simple as setting SECONDS=0 before the loop and then looping on [ $SECONDS -lt $timeout ]. The attached (lightly tested) patch implements the above suggestions and also fixes a few incorrectly (IMHO) indented lines.
Thanks for report and patch. Patch seems fine to me, I have no remarks to it.
ypbind-1.20.4-5.fc9 has been submitted as an update for Fedora 9
ypbind-1.20.4-5.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update ypbind'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4631
ypbind-1.20.4-5.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.