#!/bin/bash # # /etc/rc.d/init.d/pvfs-kernel-client # # Starts the PVFS kernel client daemon # # chkconfig: 345 14 86 # description: PVFS kernel client daemon # processname: pvfs2-client # Source function library. . /etc/rc.d/init.d/functions [ -x /usr/sbin/pvfs2-client ] || exit 0 RETVAL=0 # # See how we were called. # servicename="pvfs2-client" processname="pvfs2-client" pidfile="/var/run/pvfs2-client.pid" CONFIG="/etc/pvfs2-fs.conf" OPTIONS="" start() { echo -n $"Starting PVFS kernel client daemon: " daemon --check $servicename $processname $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename } stop() { echo -n $"Stopping PVFS kernel client daemon: " killproc $processname RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$servicename echo return $RETVAL } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; condrestart) if [ -f /var/lock/subsys/$servicename ]; then restart fi ;; status) status $servicename ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart}" exit 1 esac exit $RETVAL