summary refs log tree commit diff
path: root/nscd/nscd.init
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /nscd/nscd.init
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'nscd/nscd.init')
-rw-r--r--nscd/nscd.init43
1 files changed, 22 insertions, 21 deletions
diff --git a/nscd/nscd.init b/nscd/nscd.init
index d5c1cb9ae3..1fba72f5c3 100644
--- a/nscd/nscd.init
+++ b/nscd/nscd.init
@@ -9,7 +9,18 @@
 #		slow naming services like NIS, NIS+, LDAP, or hesiod.
 # processname: /usr/sbin/nscd
 # config: /etc/nscd.conf
+# config: /etc/sysconfig/nscd
 #
+### BEGIN INIT INFO
+# Provides: nscd
+# Required-Start: $syslog
+# Default-Stop: 0 1 6
+# Short-Description: Starts the Name Switch Cache Daemon
+# Description:  This is a daemon which handles passwd and group lookups \
+#		for running programs and cache the results for the next \
+#		query.  You should start this daemon if you use \
+#		slow naming services like NIS, NIS+, LDAP, or hesiod.
+### END INIT INFO
 
 # Sanity checks.
 [ -f /etc/nscd.conf ] || exit 0
@@ -18,20 +29,8 @@
 # Source function library.
 . /etc/init.d/functions
 
-# nscd does not run on any kernel lower than 2.2.0 because of threading
-# problems, so we require that in first place.
-case $(uname -r) in
-    2.[2-9].*)
-	# this is okay
-	;;
-    [3-9]*)
-	# these are of course also okay
-	;;
-    *)
-	#this is not
-	exit 0
-	;;
-esac
+# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
+[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
 
 RETVAL=0
 prog=nscd
@@ -47,7 +46,7 @@ start () {
 #   	fi
 #   done
     echo -n $"Starting $prog: "
-    daemon /usr/sbin/nscd $secure
+    daemon /usr/sbin/nscd $secure $NSCD_OPTIONS
     RETVAL=$?
     echo
     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
@@ -88,21 +87,23 @@ case "$1" in
 	RETVAL=$?
 	;;
     status)
-        status nscd
+	status nscd
 	RETVAL=$?
-        ;;
+	;;
     restart)
 	restart
 	RETVAL=$?
 	;;
-    condrestart)
+    try-restart | condrestart)
 	[ -e /var/lock/subsys/nscd ] && restart
 	RETVAL=$?
 	;;
-    reload)
-  	killproc /usr/sbin/nscd -HUP
+    force-reload | reload)
+    	echo -n $"Reloading $prog: "
+	killproc /usr/sbin/nscd -HUP
 	RETVAL=$?
-        ;;
+	echo
+	;;
     *)
 	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
 	RETVAL=1