#!/bin/sh
#
# chkconfig:	345 72 28
# description:	Runs the automount daemon that mounts devices and NFS hosts \
#		on demand.
# processname:	amd
# config:	/etc/amd.conf

# Source function library.
. /etc/rc.d/init.d/functions

# Demon specified configuration.
. /etc/sysconfig/amd

# See how we were called.
case "$1" in
  start)
	msg_starting amd
	daemon /usr/sbin/amd -a $ADIR -l syslog $AMDOPTS -c 1000 $MOUNTPTS
	touch /var/lock/subsys/amd
	;;
  stop)
	msg_stopping amd
	killproc amd
	rm -f /var/lock/subsys/amd
	;;
  status)
	status amd
	;;
  restart)
	$0 stop
	$0 start
	;;
  reload)
	killall -HUP amd
	;;
  *)
	msg_usage "$0 {start|stop|status|restart|reload}"
	exit 1
esac

exit 0

