postinstall revision 6f45ec7b0b964c3be967c4880e8867ac1e7763a5
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# CDDL HEADER START
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# The contents of this file are subject to the terms of the
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# Common Development and Distribution License (the "License").
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# You may not use this file except in compliance with the License.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# See the License for the specific language governing permissions
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# and limitations under the License.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# When distributing Covered Code, include this CDDL HEADER in each
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# If applicable, add the following below this CDDL HEADER, with the
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# fields enclosed by brackets "[]" replaced with your own identifying
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# information: Portions Copyright [yyyy] [name of copyright owner]
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# CDDL HEADER END
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# Use is subject to license terms.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# ident "%Z%%M% %I% %E% SMI"
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# POLICY='read_priv_set=net_rawaccess write_priv_set=net_rawaccess'
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# Select the correct add_drv options to execute.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # Irrespective of whether hardware exists
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # or not don't attempt to attach driver
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # to the hardware. This is to avoid problems
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # with installing a 32 bit driver on a 64 bit
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # running system.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # On a client,
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # modify the system files and touch/reconfigure
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift # for reconfigure reboot
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# Make sure add_drv has *not* been previously executed
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift# before attempting to add the driver.
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swiftgrep -w "${DRV}" ${BASEDIR}/etc/name_to_major > /dev/null 2>&1
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift ${ADD_DRV} -m "${DRVPERM}" -i "${DRVALIAS}" ${DRV}
7ce59cffdb903ce1661537ac78892e0ca8a79dd2matthew_swift echo " add_drv Failed; ${DRV} is already in ${BASEDIR}/etc/name_to_major"