3 # cachefilesd Start up and shut down the cachefilesd daemon
7 # description: Starts user-level daemon that manages the caching files \
8 # used by Network Filsystems
10 # processname: cachefilesd
11 # config: /etc/cachefilesd.conf
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "CacheFiles Daemon"
31 CONFFILE=/etc/cachefilesd.conf
32 PIDFILE=/var/run/cachefilesd.pid
33 OPTIONS="-f $CONFFILE"
35 # Get service config - may override defaults
36 [ -f /etc/sysconfig/cachefilesd ] && . /etc/sysconfig/cachefilesd
39 # Check if the service is already running?
40 if [ -f /var/lock/subsys/cachefilesd ]; then
41 msg_already_running "CacheFiles Daemon"
45 msg_starting "CacheFiles Daemon"
46 modprobe -qs cachefiles
47 daemon --pidfile=$PIDFILE /usr/sbin/cachefilesd $OPTIONS
49 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cachefilesd
53 if [ ! -f /var/lock/subsys/cachefilesd ]; then
54 msg_not_running "CacheFiles Daemon"
59 msg_stopping "CacheFiles Daemon"
60 killproc --pidfile $PIDFILE cachefilesd -TERM
61 rm -f /var/lock/subsys/cachefilesd
65 if [ ! -f /var/lock/subsys/cachefilesd ]; then
66 msg_not_running "CacheFiles Daemon"
76 # See how we were called.
95 status --pidfile $PIDFILE cachefilesd
99 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"