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
21 # nscd does not run on any kernel lower than 2.2.0 because of threading
22 # problems, so we require that in first place.
28 # these are of course also okay
38 # See how we were called.
42 # for table in passwd group
44 # if egrep '^'$table':.*nisplus' /etc/nsswitch.conf >/dev/null
46 # /usr/lib/nscd_nischeck $table ||
47 # secure="$secure -S $table,yes"
50 echo -n "Starting Name Switch Cache Daemon: "
54 [ $RETVAL -eq 0 ] && touch /var
/lock
/subsys
/nscd
57 echo -n "Stopping Name Switch Cache Daemon: "
60 if [ $RETVAL -eq 0 ]; then
61 rm -f /var
/lock
/subsys
/nscd
81 echo "Usage: $0 {start|stop|status|restart}"