3 # nscd: Starts the Name Switch Cache Daemon
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 if you use \
9 # slow naming services like NIS, NIS+, LDAP, or hesiod.
10 # processname: /usr/sbin/nscd
11 # config: /etc/nscd.conf
15 # Required-Start: $syslog
17 # Short-Description: Starts the Name Switch Cache Daemon
18 # Description: This is a daemon which handles passwd and group lookups \
19 # for running programs and cache the results for the next \
20 # query. You should start this daemon if you use \
21 # slow naming services like NIS, NIS+, LDAP, or hesiod.
25 [ -f /etc/nscd.conf ] || exit 0
26 [ -x /usr/sbin/nscd ] || exit 0
28 # Source function library.
29 . /etc/init.d/functions
31 # nscd does not run on any kernel lower than 2.2.0 because of threading
32 # problems, so we require that in first place.
38 # these are of course also okay
50 [ -d /var/run/nscd ] || mkdir /var/run/nscd
51 [ -d /var/db/nscd ] || mkdir /var/db/nscd
52 echo -n $"Starting $prog: "
56 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
61 echo -n $"Stopping $prog: "
64 if [ $RETVAL -eq 0 ]; then
65 rm -f /var/lock/subsys/nscd
66 # nscd won't be able to remove these if it is running as
67 # a non-privileged user
68 rm -f /var/run/nscd/nscd.pid
69 rm -f /var/run/nscd/socket
70 success $"$prog shutdown"
72 failure $"$prog shutdown"
83 # See how we were called.
101 try-restart | condrestart)
102 [ -e /var/lock/subsys/nscd ] && restart
105 force-reload | reload)
106 echo -n $"Reloading $prog: "
107 killproc /usr/sbin/nscd -HUP
112 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"