#!/sbin/sh
# @(#)src/unix/pagecache/sol/common/pkg/vxfs/VXFSLDLIC	3.1.54.1 08/21/02 18:10:50
#ident "@(#)vxfs:src/unix/pagecache/sol/common/pkg/vxfs/VXFSLDLIC	3.1.54.1"
#
# (c)  VERITAS Software Corporation. All rights reserved.
#

#
# run vxenablef command to load the full license if present.
# first modload vxportal ( also vxfs ) - so that when 
# vxenablef issues the license ioctls vx_init would have
# completed the platform specific initializations
#

VXPORTAL=/kernel/drv/vxportal
MODLOAD=/usr/sbin/modload
VXENABLEF=/opt/VRTS/bin/vxenablef

#
# usage : error_exit mesg
#
error_exit() {
	echo "ERROR : $1"
	exit 1
}


#
# usage : main
#
main() {
	if [ -f $VXPORTAL ]
	then
		$MODLOAD $VXPORTAL
		[ -f $VXENABLEF ] || error_exit "can't find $VXENABLEF"
		$VXENABLEF -a
	fi
}

main
