#!/bin/sh # # chkconfig: 2345 98 02 # description: hostafsd startup # Source function library. . /etc/rc.d/init.d/functions if [ -f /etc/sysconfig/hostafsd ] ; then . /etc/sysconfig/hostafsd fi [ -f /usr/local/sbin/hostafsd ] || exit 0 prog="hostafsd" start() { echo -n $"Starting $prog: " daemon /usr/local/sbin/hostafsd $HOSTAFSD_OPTIONS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hostafsd echo return $RETVAL } stop() { if test "x`pidof hostafsd`" != x; then echo -n $"Stopping $prog: " killall hostafsd echo fi RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/hostafsd return $RETVAL } case "$1" in start) start ;; force-start) start ;; stop) stop ;; status) status afsd ;; restart) stop start ;; condrestart) if test "x`pidof afsd`" != x; then stop start fi ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit 0