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 only if you use \
9 # slow Services like NIS or NIS+
11 # config: /etc/nscd.conf
15 [ -f /etc/nscd.conf ] || exit 0
16 [ -x /usr/sbin/nscd ] || exit 0
18 # Source function library.
19 . /etc/rc.d/init.d/functions
22 [ -f /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
25 # See how we were called.
28 if [ ! -f /var/lock/subsys/nscd ]; then
29 msg_starting "Name Switch Cache Daemon"
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
34 msg_already_running "Name Switch Cache Daemon"
38 if [ -f /var/lock/subsys/nscd ]; then
39 msg_stopping "Name Switch Cache Daemon"
42 rm -f /var/lock/subsys/nscd >/dev/null 2>&1
45 msg_not_running "Name Switch Cache Daemon"
58 msg_usage "$0 {start|stop|restart|force-reload|status}"