#!/bin/bash
#
# hppciclt init script.
#
# chkconfig: 345 99 00
# description: HP PCI Information collector.

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

test -x /usr/hpserver/bin/hppciclt || exit 1

RETVAL=0

#
#	See how we were called.
#
case "$1" in
  start)
	# Check if hppciclt is already running
	if [ ! -f /var/lock/subsys/hppciclt ]; then
	    echo -n 'Starting HP PCI Information collector: '
	    daemon /usr/hpserver/bin/hppciclt
	    RETVAL=$?
	    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hppciclt
	    echo
	fi
	;;
  stop)
	rm -f /var/lock/subsys/hppciclt
	;;
  *)
	echo "Usage: /etc/rc.d/init.d/hppciclt {start|stop}"
	exit 1
esac

exit $RETVAL
