#!/bin/sh
#
# @(#) postinstall	1.2 95/11/28 13:34:07

PATH="/usr/bin:/usr/sbin:${PATH}"
export PATH

#
# Load the module using add_drv
#
if [ "$BASEDIR" = "/" ]
then 	
	#
	# We're modifying the running kernel
	#
	if prtconf -p | fgrep -s "'SUNW,ffb'"; then
		add_drv -m '* 0666 root sys' -i 'SUNW,ffb' ffb
		rc=$?
		test $rc -eq 0 && exit 0
		## fall thru if errors in add_drv ##
	fi
fi

#
# We're modifying a mounted kernel
#
add_drv -b ${BASEDIR} -m '* 0666 root sys' -i 'SUNW,ffb' ffb
touch ${BASEDIR}/reconfigure

echo "" >&2
echo "NOTE: Reboot your system to load the FFB driver." >&2
echo "" >&2

exit 0
