#!/bin/bash

RETVAL=0
LOCKDIR=/var/lock/subsys
BINDIR=/usr/hpserver/bin
PROGRAM=hpnidclt

test -x $BINDIR/nidreg || exit 1

case "$1" in
  start)
	echo -n "Starting HP Netserver Identification collector: $PROGRAM"
	$BINDIR/nidreg -w
	echo "."
	;;
  stop)
	echo -n "Stopping HP Netserver Identification collector: $PROGRAM"
	killall nidreg > /dev/null 2>&1 :
	echo "."
	;;
  reload|restart)
	$0 stop
	$0 start
	RETVAL=$?
	;;
#  status)
#	status /usr/hpserver/bin/hpasrsvc
#	RETVAL=$?
#	;;
  *)
	echo "Usage: /etc/init.d/hpnidclt {start|stop|reload|restart}"
	exit 1
esac

exit $RETVAL
