postinstall revision fe930412c257f961ae67039de3b164b83717976a
70N/A#!/sbin/sh
70N/A#
1339N/A# CDDL HEADER START
70N/A#
1339N/A# The contents of this file are subject to the terms of the
70N/A# Common Development and Distribution License (the "License").
70N/A# You may not use this file except in compliance with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A#
919N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
919N/A# Use is subject to license terms.
70N/A#
70N/A# ident "%Z%%M% %I% %E% SMI"
70N/A#
70N/A
493N/APATH="/usr/bin:/usr/sbin:${PATH}"
70N/Aexport PATH
70N/A
1370N/A#
70N/A# Driver info
911N/A#
1370N/ADRV=hxge
1370N/ADRVALIAS=" \"pci108e,aaaa\" "
1370N/A
911N/ADRVPERM='* 0600 root sys'
970N/A# POLICY='read_priv_set=net_rawaccess write_priv_set=net_rawaccess'
977N/AMAJORDEV=11
970N/A
970N/A#
1339N/A# Select the correct add_drv options to execute.
1339N/A#
1339N/Aif [ "${BASEDIR}" = "/" ]; then
970N/A #
970N/A # Irrespective of whether hardware exists or not don't attempt to
970N/A # attach driver to the hardware. The driver will be attached when
970N/A # it is configured using ifconfig
970N/A #
970N/A ADD_DRV="add_drv -n"
970N/Aelse
1370N/A #
1370N/A # On a client,
970N/A # modify the system files and touch/reconfigure
70N/A # for reconfigure reboot
1179N/A #
493N/A ADD_DRV="add_drv -b ${BASEDIR}"
70N/Afi
970N/A
970N/A#
970N/A# Make sure add_drv has *not* been previously executed
1196N/A# before attempting to add the driver.
1196N/A#
1447N/Agrep -w "${DRV}" ${BASEDIR}/etc/name_to_major > /dev/null 2>&1
1196N/Aif [ $? -eq 1 ]; then
70N/A ${ADD_DRV} -m "${DRVPERM}" -i "${DRVALIAS}" ${DRV}
970N/A if [ $? -ne 0 ]; then
970N/A echo "\nFailed add_drv!\n"
970N/A fi
970N/Afi
970N/A
970N/Aexit 0