#!/bin/sh

# ident	"@(#)postinstall	1.11	99/08/23 SMI"

_basedir=`pkgparam ${PKGINST} BASEDIR`
_productdir=`pkgparam ${PKGINST} PRODUCTDIR`

add_driver(){
 	driver=$1
	MODE='* 0600 root sys'
	if [ "${PKG_INSTALL_ROOT}" != "" ] ; then
		$ADD_DRV -b ${PKG_INSTALL_ROOT} -m "${MODE}" -n $driver || exit 1
	else
 		$ADD_DRV -m "${MODE}" -n $driver || exit 1
	fi
} #add_driver()
 
# hot os
ADD_DRV="/usr/sbin/add_drv"
 
[ -f ${PKG_INSTALL_ROOT}/platform/`uname -m`/kernel/drv/scid ] || exit 0;
[ -f ${PKG_INSTALL_ROOT}/kernel/drv/sci ] || exit 0;
add_driver scid

# the following 'touch /reconfigure' is to cause the next reboot
#  to perform a reconfiguration
/usr/bin/touch ${PKG_INSTALL_ROOT}/reconfigure
/usr/bin/sync
