From f93f0c9c8cc737c38a41abf672a514293d894dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Tue, 15 Nov 2011 09:32:48 +0100 Subject: [PATCH 1/4] 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 - 3:1.32-1 +- Fixed init script to handle long rpcinfo requests + * Thu Jul 8 2010 Karel Klic - 3:1.32-1 - Update to new version which contains the -matches.patch From 74d4fc0ca5bb9c30e5bbef83511bf44f39f2b14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Tue, 15 Nov 2011 09:34:46 +0100 Subject: [PATCH 2/4] release bump --- ypbind.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ypbind.spec b/ypbind.spec index 4bcc609..87f327f 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.32 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -79,7 +79,7 @@ fi %doc README NEWS COPYING %changelog -* Tue Nov 15 2011 Honza Horak - 3:1.32-1 +* Tue Nov 15 2011 Honza Horak - 3:1.32-2 - Fixed init script to handle long rpcinfo requests * Thu Jul 8 2010 Karel Klic - 3:1.32-1 From 6fd6da851e3e201c883e172a6e88fcd22ca11b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 21 Nov 2011 09:10:33 +0100 Subject: [PATCH 3/4] handle firsttime in ypbind.init correctly --- ypbind.init | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ypbind.init b/ypbind.init index c40e7b3..5d8eb82 100755 --- a/ypbind.init +++ b/ypbind.init @@ -108,13 +108,9 @@ start() { firsttime=1 SECONDS=0 while [ $SECONDS -lt $timeout ] || [ $firsttime -eq 1 ] ; do + firsttime=0 if /usr/sbin/rpcinfo -p | LC_ALL=C fgrep -q ypbind then - if [ $firsttime -eq 1 ]; then - # reset timeout - timeout=$NISTIMEOUT - firsttime=0 - fi /usr/bin/ypwhich > /dev/null 2>&1 retval=$? if [ $retval -eq 0 ]; then From caa830e0af920449c63f71724432bfc263d03a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 21 Nov 2011 09:13:42 +0100 Subject: [PATCH 4/4] release bump --- ypbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ypbind.spec b/ypbind.spec index 87f327f..f40ab44 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.32 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -79,6 +79,9 @@ fi %doc README NEWS COPYING %changelog +* Mon Nov 21 2011 Honza Horak - 3:1.32-3 +- fixed firsttime handling in ypbind.init wait cycle + * Tue Nov 15 2011 Honza Horak - 3:1.32-2 - Fixed init script to handle long rpcinfo requests