about summary refs log tree commit diff
path: root/nscd/nscd.init
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-01-31 08:39:55 +0000
committerUlrich Drepper <drepper@redhat.com>1998-01-31 08:39:55 +0000
commitd67281a7eac124e2f1b498c377dde3432f711039 (patch)
tree77832ea40d41c4c0858f1248829ad2dfdb513786 /nscd/nscd.init
parent4eb36693e4452db4679a33c750c0738b73d1ebc5 (diff)
downloadglibc-d67281a7eac124e2f1b498c377dde3432f711039.tar.gz
glibc-d67281a7eac124e2f1b498c377dde3432f711039.tar.xz
glibc-d67281a7eac124e2f1b498c377dde3432f711039.zip
Update.
1998-01-31  Phil Blundell  <philb@gnu.org>

	* configure.in: Add --without-cvs option to suppress automatic
	checkin of regenerated files.
	* config.make: Likewise.
	* Makefile: Respect with-cvs setting.
	* Makerules: Likewise.

	* configure.in: Allow the standalone ARM port to be configured.

1998-01-31  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* grp/getgrgid_r.c: Define USE_NSCD.
	* grp/getgrnam_r.c: Likewise.
	* pwd/getpwuid_r.c: Likewise.
	* pwd/getpwnam_r.c: Likewise.

	* sysdeps/unix/inet/Subdirs: Add nscd subdir.

	* nss/getXXbyYY_r.c: Try at first nscd.

	* nscd/Makefile: New, for the Name Switch Cache Daemon (nscd).
	* nscd/connections.c: New file.
	* nscd/dbg_log.c: New file.
	* nscd/dbg_log.h: New file.
	* nscd/grpcache.c: New file.
	* nscd/nscd.c: New file.
	* nscd/nscd.h: New file.
	* nscd/nscd_conf.c: New file.
	* nscd/nscd_stat.c: New file.
	* nscd/pwdcache.c: New file.

	* nscd/nscd_getgr_r.c: New, client code, linked into libc.
	* nscd/nscd_getpw_r.c: Likewise.
	* nscd/nscd_proto.h: New, prototypes for client functions.

	* nscd/nscd.conf: New, example for a configuration file.
	* nscd/nscd.init: New, example for a startup script.

	* nscd/getgrgid_r.c: Old grp/getgrgid_r version, used from nscd to
	avoid deadlocks.
	* nscd/getgrnam_r.c: Likewise.
	* nscd/getpwnam_r.c: Likewise.
	* nscd/getpwuid_r.c: Likewise.

	* nis/nis_cache.c: New file.
	* nis/nis_cache2.h: New file.
	* nis/nis_cache2_xdr.c: New file.
Diffstat (limited to 'nscd/nscd.init')
-rw-r--r--nscd/nscd.init50
1 files changed, 50 insertions, 0 deletions
diff --git a/nscd/nscd.init b/nscd/nscd.init
new file mode 100644
index 0000000000..097ce42c99
--- /dev/null
+++ b/nscd/nscd.init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# nscd:		Starts the Name Switch Cache Daemon
+#
+# chkconfig: 345 52 25
+# 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 only if you use
+#		slow Services like NIS or NIS+
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# See how we were called.
+case "$1" in
+    start)
+	test -f /etc/nscd.conf -a -f /usr/sbin/nscd || exit 0
+	secure=""
+#	for table in passwd group
+#	do
+#		if egrep '^'$table':.*nisplus' /etc/nsswitch.conf >/dev/null
+#		then
+#			/usr/lib/nscd_nischeck $table ||
+#				secure="$secure -S $table,yes"
+#		fi
+#	done
+        echo -n "Starting Name Switch Cache Daemon: "
+	daemon nscd $secure
+        echo
+        touch /var/lock/subsys/nscd
+	;;
+    stop)
+	test -f /usr/sbin/nscd || exit 0
+	echo -n "Stopping Name Switch Cache Daemon: "
+	/usr/sbin/nscd -K
+        rm -f /var/lock/subsys/nscd
+        echo nscd
+	;;
+  status)
+        status nscd
+        ;;
+  restart)
+        $0 stop
+        $0 start
+        ;;
+    *)
+	echo "Usage: /etc/rc.d/init.d/nscd.init {start|stop|status|restart}"
+	;;
+esac
+exit 0