]> git.pld-linux.org Git - packages/glibc.git/blame_incremental - nscd.init
bogus
[packages/glibc.git] / nscd.init
... / ...
CommitLineData
1#!/bin/sh
2#
3# nscd: Starts the Name Switch Cache Daemon
4#
5# chkconfig: 345 30 80
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+
10# processname: nscd
11# config: /etc/nscd.conf
12#
13
14# Sanity checks.
15[ -f /etc/nscd.conf ] || exit 0
16[ -x /usr/sbin/nscd ] || exit 0
17
18# Source function library.
19. /etc/rc.d/init.d/functions
20
21# Get sysconfig
22[ -f /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
23
24RETVAL=0
25# See how we were called.
26case "$1" in
27 start)
28 if [ ! -f /var/lock/subsys/nscd ]; then
29 msg_starting "Name Switch Cache Daemon"
30 daemon nscd
31 RETVAL=$?
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
33 else
34 msg_already_running "Name Switch Cache Daemon"
35 fi
36 ;;
37 stop)
38 if [ -f /var/lock/subsys/nscd ]; then
39 msg_stopping "Name Switch Cache Daemon"
40 busy
41 /usr/sbin/nscd -K
42 rm -f /var/lock/subsys/nscd >/dev/null 2>&1
43 ok
44 else
45 msg_not_running "Name Switch Cache Daemon"
46 fi
47 ;;
48 status)
49 status nscd
50 exit $?
51 ;;
52 restart|force-reload)
53 $0 stop
54 $0 start
55 exit $?
56 ;;
57 *)
58 msg_usage "$0 {start|stop|restart|force-reload|status}"
59 exit 3
60esac
61
62exit $RETVAL
This page took 0.027252 seconds and 4 git commands to generate.