rpms/ypbind/F-10 ypbind.init,1.21,1.22 ypbind.spec,1.53,1.54

Vitezslav Crhonek vcrhonek at fedoraproject.org
Wed Mar 11 11:36:07 UTC 2009


Author: vcrhonek

Update of /cvs/extras/rpms/ypbind/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4816

Modified Files:
	ypbind.init ypbind.spec 
Log Message:
Fix init script


Index: ypbind.init
===================================================================
RCS file: /cvs/extras/rpms/ypbind/F-10/ypbind.init,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ypbind.init	10 Jun 2008 13:22:46 -0000	1.21
+++ ypbind.init	11 Mar 2009 11:35:37 -0000	1.22
@@ -12,6 +12,16 @@
 # processname: ypbind
 # config: /etc/yp.conf
 
+### BEGIN INIT INFO
+# Provides: $ypbind
+# Required-Start: $network $syslog
+# Required-Stop: $network $syslog
+# Default-Start:
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: start|stop|restart|condrestart|try-restart|reload|force-reload|status NIS client
+# Description: This is a daemon which runs on NIS/YP clients and binds them to a NIS domain
+### END INIT INFO
+
 OTHER_YPBIND_OPTS=""
 
 # Source function library.
@@ -99,18 +109,18 @@
 	    		fi
 		fi
 		sleep 2
-		echo -n "..."
+		echo -n "."
 	done
 	if [ $RETVAL -eq 0 ]; then
-	    logger -t ypbind \
-	    	"NIS domain: `domainname`, NIS server: `ypwhich 2> /dev/null`"
-	    touch /var/lock/subsys/ypbind
-	    success
+		logger -t ypbind \
+			"NIS domain: `domainname`, NIS server: `ypwhich 2> /dev/null`"
+		touch /var/lock/subsys/ypbind
+		success
 	else
-	    logger -t ypbind \
-	    	"NIS server for domain `domainname` is not responding."
-	    failure
-	    #selinux_off
+		logger -t ypbind \
+			"NIS server for domain `domainname` is not responding."
+		failure
+		#selinux_off
 		RETVAL=100
 	fi
 	echo
@@ -121,10 +131,10 @@
 	echo -n $"Shutting down NIS service: "
 	killproc ypbind
 	RETVAL=$?
-	if [ $RETVAL -eq 0 ] ; then
+	if [ $RETVAL -eq 0 ]; then
 		rm -f /var/lock/subsys/ypbind
 		# if  we used brute force (like kill -9) we don't want those around
-		if [ x$(domainname) != x ] ; then
+		if [ x$(domainname) != x ]; then
 			rm -f /var/yp/binding/$(domainname)*
 		fi
 	fi
@@ -138,30 +148,52 @@
 	start
 }
 
+reload() {
+	echo -n $"Reloading NIS service: "
+        p=`/sbin/pidof -o %PPID 'ypbind'`
+        RETVAL=$?
+        if [ "$RETVAL" -eq 0 ]; then
+            /bin/kill -HUP $p
+            RETVAL=$?
+        fi
+        [ "$RETVAL" -eq 0 ] && success || failure
+        echo
+        return $RETVAL
+}
+
 RETVAL=0
 
 # See how we were called.
 case "$1" in
   start)
-	start 
-	[ $? -eq 100 ] && stop
+	start
+	RETVAL=$?
+	if [ $RETVAL -eq 100 ]; then stop; RETVAL=1; fi
 	;;
   stop)
 	stop
+	RETVAL=$?
 	;;
   status)
 	status ypbind
 	RETVAL=$?
 	;;
-  restart|reload)
+  restart)
 	restart
+	RETVAL=$?
+	;;
+  condrestart|try-restart)
+	if [ -e /var/lock/subsys/ypbind ]; then restart; fi
+	;;
+  reload)
+	reload
 	;;
-  condrestart)
-        [ -f /var/lock/subsys/ypbind ] && restart || :
+  force-reload)
+	if ! reload; then restart; fi
 	;;
   *)
-	echo $"Usage: $0 {start|stop|status|restart|condrestart}"
-	exit 1
+	echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}"
+	RETVAL=3
 esac
 
-exit $?
+exit $RETVAL


Index: ypbind.spec
===================================================================
RCS file: /cvs/extras/rpms/ypbind/F-10/ypbind.spec,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- ypbind.spec	21 Oct 2008 13:13:01 -0000	1.53
+++ ypbind.spec	11 Mar 2009 11:35:37 -0000	1.54
@@ -1,7 +1,7 @@
 Summary: The NIS daemon which binds NIS clients to an NIS domain
 Name: ypbind
 Version: 1.20.4
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{PACKAGE_VERSION}.tar.bz2
@@ -92,6 +92,10 @@
 %doc README NEWS
 
 %changelog
+* Wed Mar 11 2009 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.20.4-10
+- Fix init script
+  Resolves: #489200
+
 * Tue Oct 21 2008 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.20.4-9
 - Merge Review - remove dot from end of the summary, convert all tags
   in %%changelog to utf-8, escape %% character in changelog, fix




More information about the fedora-extras-commits mailing list