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 # See how we were called.
25 for table
in passwd group hosts
27 if egrep '^'$table':.*nisplus' /etc
/nsswitch.conf
>/dev
/null
29 /usr
/sbin
/nscd_nischeck
$table ||
30 secure
="$secure -S $table,yes"
33 echo -n "Starting Name Switch Cache Daemon: "
36 touch /var
/lock
/subsys
/nscd
39 echo -n "Stopping Name Switch Cache Daemon: "
41 rm -f /var
/lock
/subsys
/nscd
52 echo "Usage: $0 {start|stop|status|restart}"