]> git.pld-linux.org Git - packages/glibc.git/blame - nscd.init
- rc script.
[packages/glibc.git] / nscd.init
CommitLineData
da301058 1#!/bin/bash
2#
3# nscd: Starts the Name Switch Cache Daemon
4#
5# chkconfig: - 30 80
6# description: This is a daemon which handles passwd and group lookups \
7# for running programs and cache the results for the next \
8# query. You should start this daemon only if you use \
9# slow Services like NIS or NIS+
10# processname: nscd
11# config: /etc/nscd.conf
12#
13
14# Sanity checks.
15[ -f /etc/nscd.conf ] || exit 0
16[ -x /usr/sbin/nscd ] || exit 0
17
18# Source function library.
19. /etc/rc.d/init.d/functions
20
21# See how we were called.
22case "$1" in
23 start)
24 secure=""
25# for table in passwd group
26# do
27# if egrep '^'$table':.*nisplus' /etc/nsswitch.conf >/dev/null
28# then
29# /usr/lib/nscd_nischeck $table ||
30# secure="$secure -S $table,yes"
31# fi
32# done
33 show Starting Name Switch Cache Daemon
34 daemon nscd $secure
35 touch /var/lock/subsys/nscd
36 ;;
37 stop)
38 show Stopping Name Switch Cache Daemon
39 busy
40 /usr/sbin/nscd -K
41 rm -f /var/lock/subsys/nscd
42 deltext
43 ok
44 ;;
45 status)
46 status nscd
47 ;;
48 restart|reload)
49 $0 stop
50 $0 start
51 ;;
52 *)
53 echo "Usage: $0 {start|stop|status|restart|reload}"
54 ;;
55esac
56exit 0
This page took 0.086959 seconds and 4 git commands to generate.