[ypbind/f14] Fixed init script to handle long rpcinfo requests

Jan Horak hhorak at fedoraproject.org
Tue Nov 15 08:32:57 UTC 2011


commit f93f0c9c8cc737c38a41abf672a514293d894dd5
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Tue Nov 15 09:32:48 2011 +0100

    Fixed init script to handle long rpcinfo requests

 ypbind.init |   16 ++++++++++++++--
 ypbind.spec |    3 +++
 2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/ypbind.init b/ypbind.init
index 0e255d5..c40e7b3 100755
--- a/ypbind.init
+++ b/ypbind.init
@@ -14,6 +14,18 @@
 #
 # See https://fedoraproject.org/wiki/Packaging:SysVInitScript for
 # the guidelines document.
+### BEGIN INIT INFO
+# Provides: ypbind
+# Required-Start: $local_fs $remote_fs $network $rpcbind
+# Required-Stop: $local_fs $remote_fs $network $rpcbind
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Starts the ypbind daemon
+# Description: This is a daemon which runs on NIS/YP clients and binds them \
+#              to a NIS domain. It must be running for systems based on glibc \
+#              to work as NIS clients, but it should not be enabled on systems \
+#              which are not using NIS.
+### END INIT INFO
 
 OTHER_YPBIND_OPTS=""
 
@@ -92,10 +104,10 @@ start() {
     # 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.
-    timeout=10
+    timeout=$NISTIMEOUT
     firsttime=1
     SECONDS=0
-    while [ $SECONDS -lt $timeout ]; do
+    while [ $SECONDS -lt $timeout ] || [ $firsttime -eq 1 ] ; do
 	if /usr/sbin/rpcinfo -p | LC_ALL=C fgrep -q ypbind
 	then
 	    if [ $firsttime -eq 1 ]; then
diff --git a/ypbind.spec b/ypbind.spec
index ecad856..4bcc609 100644
--- a/ypbind.spec
+++ b/ypbind.spec
@@ -79,6 +79,9 @@ fi
 %doc README NEWS COPYING
 
 %changelog
+* Tue Nov 15 2011 Honza Horak <hhorak at redhat.com> - 3:1.32-1
+- Fixed init script to handle long rpcinfo requests
+
 * Thu Jul  8 2010 Karel Klic <kklic at redhat.com> - 3:1.32-1
 - Update to new version which contains the -matches.patch
 


More information about the scm-commits mailing list