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
12 # config: /etc/sysconfig/nscd
16 # Required-Start: $syslog
18 # Short-Description: Starts the Name Switch Cache Daemon
19 # Description: This is a daemon which handles passwd and group lookups \
20 # for running programs and cache the results for the next \
21 # query. You should start this daemon if you use \
22 # slow naming services like NIS, NIS+, LDAP, or hesiod.
26 [ -f /etc
/nscd.conf
] ||
exit 0
27 [ -x /usr
/sbin
/nscd
] ||
exit 0
29 # Source function library.
30 .
/etc
/init.d
/functions
32 # Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
33 [ -r /etc
/sysconfig
/nscd
] && .
/etc
/sysconfig
/nscd
39 [ -d /var
/run
/nscd
] || mkdir
/var
/run
/nscd
40 [ -d /var
/db
/nscd
] || mkdir
/var
/db
/nscd
41 echo -n $
"Starting $prog: "
42 daemon
/usr
/sbin
/nscd
$NSCD_OPTIONS
45 [ $RETVAL -eq 0 ] && touch /var
/lock
/subsys
/nscd
50 echo -n $
"Stopping $prog: "
53 if [ $RETVAL -eq 0 ]; then
54 rm -f /var
/lock
/subsys
/nscd
55 # nscd won't be able to remove these if it is running as
56 # a non-privileged user
57 rm -f /var
/run
/nscd
/nscd.pid
58 rm -f /var
/run
/nscd
/socket
59 success $
"$prog shutdown"
61 failure $
"$prog shutdown"
72 # See how we were called.
90 try-restart | condrestart
)
91 [ -e /var
/lock
/subsys
/nscd
] && restart
94 force-reload | reload
)
95 echo -n $
"Reloading $prog: "
97 /usr
/sbin
/nscd
-i passwd || RETVAL
=$?
98 /usr
/sbin
/nscd
-i group || RETVAL
=$?
99 /usr
/sbin
/nscd
-i hosts || RETVAL
=$?
100 /usr
/sbin
/nscd
-i services || RETVAL
=$?
104 echo $
"Usage: $0 {start|stop|status|restart|reload|condrestart}"