#!/bin/sh
# this script will replace the rc.HAGENT
DIR=/etc/addons.d/HAGENT

case $1 in
	init)
	# when this script was invoked first time install the new version
		(sudo su -c rw; mv $DIR/*.pak /tmp/; ro)
		# the rc.HAGENT init will be done in this command
		/sbin/installer/installer.sh -l /tmp/HAGENT*.pak
		# after installation, the rc.HAGENT will be replaced by a new normal one
		# which will perform the regular function
	;;
esac

exit 0
