From 5d711fc0e2966e547e0fe289c83e8105ff3d0ec7 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 15:12:20 +0000 Subject: [PATCH] =?UTF-8?q?auto-import=20changelog=20data=20from=20ypbind-?= =?UTF-8?q?1.7-6.src.rpm=20Sat=20Mar=2003=202001=20Preston=20Brown=20=20-=20much=20more=20sane=20ypbind=20init=20scrip?= =?UTF-8?q?t=20for=20when=20networking=20is=20down.=20Wed=20Feb=2007=20200?= =?UTF-8?q?1=20Trond=20Eivind=20Glomsr=F8d=20=20-=20fix=20?= =?UTF-8?q?"usage"=20string=20(use=20$0)=20Wed=20Jan=2024=202001=20Florian?= =?UTF-8?q?=20La=20Roche=20=20-=20prepare=20for?= =?UTF-8?q?=20initscript=20translation=20-=20do=20not=20prereq=20/etc/init?= =?UTF-8?q?.d=20Thu=20Jan=2011=202001=20Bernhard=20Rosenkraenzer=20=20-=20Start=20after=20netfs=20(#23526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cvsignore | 2 +- sources | 2 +- ypbind.init | 37 ++++++++++++++++++++++--------------- ypbind.spec | 35 ++++++++++++++++++++++++++--------- 4 files changed, 50 insertions(+), 26 deletions(-) diff --git a/.cvsignore b/.cvsignore index a75a212..8159598 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ypbind-mt-1.6.tar.gz +ypbind-mt-1.7.tar.gz diff --git a/sources b/sources index b85c17a..d922ce0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -903b483e2434230c63407216380b6fc9 ypbind-mt-1.6.tar.gz +d6f98266a18f25337cd6afdb8282af4f ypbind-mt-1.7.tar.gz diff --git a/ypbind.init b/ypbind.init index 143e70b..7d191dc 100755 --- a/ypbind.init +++ b/ypbind.init @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash # # ypbind: Starts the ypbind Daemon # -# Version: @(#) /etc/init.d/ypbind.init 1.1 +# Version: @(#) /etc/init.d/ypbind.init 1.2 # -# chkconfig: - 17 83 +# chkconfig: - 27 73 # 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 \ @@ -19,16 +19,19 @@ OTHER_YPBIND_OPTS="" . /etc/sysconfig/network +# Check that networking is configured. +[ ${NETWORKING} = "no" ] && exit 0 + start() { DOMAINNAME=`domainname` if [ "$DOMAINNAME" = "(none)" -o "$DOMAINNAME" = "" ]; then if [ -n "$NISDOMAIN" ]; then - action "Setting NIS domain name $NISDOMAIN: " domainname $NISDOMAIN + action $"Setting NIS domain name $NISDOMAIN: " domainname $NISDOMAIN else exit 1 fi fi - echo -n "Binding to the NIS domain... " + echo -n $"Binding to the NIS domain... " daemon ypbind $OTHER_YPBIND_OPTS echo # the following fixes problems with the init scripts continuing @@ -36,23 +39,27 @@ start() { # that need NIS fail. pid=`pidofproc ypbind` if [ -n "$pid" ]; then - echo -n "Listening for an NIS domain server: " - times=0 - until ypwhich > /dev/null 2>&1 || [ "$times" = "10" ] + echo -n $"Listening for an NIS domain server." + times=1 + until ypwhich > /dev/null 2>&1 || [ "$times" = "3" ] do - echo -n "." ; - sleep 1 + RETVAL=$? + echo -n "." times=$[$times+1] done - ypwhich fi - RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ypbind + if [ $RETVAL -eq 0 ]; then + touch /var/lock/subsys/ypbind + else + failure "attempting to contact yp server" + kill "$pid" + fi + echo return $RETVAL } stop() { - echo -n "Shutting down NIS services: " + echo -n $"Shutting down NIS services: " killproc ypbind RETVAL=$? if [ $RETVAL -eq 0 ] ; then @@ -91,7 +98,7 @@ case "$1" in [ -f /var/lock/subsys/ypbind ] && restart || : ;; *) - echo "*** Usage: ypbind {start|stop|status|restart|condrestart}" + echo $"Usage: $0 {start|stop|status|restart|condrestart}" exit 1 esac diff --git a/ypbind.spec b/ypbind.spec index 275a461..b46e3d6 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,19 +1,17 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain. Name: ypbind -Version: 1.6 -Release: 12 +Version: 1.7 +Release: 6 Copyright: GPL Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/NIS/ypbind-mt-%{PACKAGE_VERSION}.tar.gz Source1: ypbind.init Patch: ypbind-pthread.patch Patch1: ypbind-mt-1.6-broadcast.patch -Patch2: ypbind-mt-1.6-syslog.patch -Prereq: /sbin/chkconfig /etc/init.d -Requires: portmap -Requires: yp-tools +Prereq: /sbin/chkconfig +Requires: portmap, yp-tools, bash >= 2.0 Epoch: 3 -Buildroot: %{_tmppath}/ypbind-root +Buildroot: %{_tmppath}/%{name}-%{version}-root %description The Network Information Service (NIS) is a system which provides @@ -33,11 +31,11 @@ programs (included in the yp-tools package). If you need an NIS server, you'll also need to install the ypserv package to a machine on your network. + %prep %setup -q -n ypbind-mt-%{version} %patch -p1 -b .pthread-fun -#XXX %patch1 -p0 -%patch2 -p1 +%patch1 -p0 %build %configure --disable-nls --sbindir=/sbin @@ -80,9 +78,28 @@ exit 0 %doc README NEWS %changelog +* Sat Mar 3 2001 Preston Brown +- much more sane ypbind init script for when networking is down. + +* Wed Feb 7 2001 Trond Eivind Glomsrød +- fix "usage" string (use $0) + +* Wed Jan 24 2001 Florian La Roche +- prepare for initscript translation +- do not prereq /etc/init.d + +* Thu Jan 11 2001 Bernhard Rosenkraenzer +- Start after netfs (#23526) + * Wed Nov 29 2000 Bill Nottingham - set NIS domain name if it's not already set +* Mon Oct 02 2000 Florian La Roche +- update to 1.7 + +* Thu Aug 31 2000 Florian La Roche +- add again automatic fallback to broadcast + * Sun Aug 20 2000 Florian La Roche - fix condrestart #16615 - security fix for syslog() call