#!/bin/sh
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)postinstall	1.1	08/12/02 SMI"
#

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

HERMON_ALIAS="\
	\"pciex15b3,6340\" \
	\"pciex15b3,634a\" \
	\"pciex15b3,6732\" \
	\"pciex15b3,673c\" \
	"
DRVPERM='* 0666 root sys'

check_installed() {
	driver=$1
	grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
	return $?
}

EXIT=0

check_installed hermon || \
add_drv -b "${BASEDIR}" \
	-m "${DRVPERM}" \
	-i "${HERMON_ALIAS}" \
	hermon || \
EXIT=1

exit ${EXIT}
