postinstall revision 1959748cbddf37d4734c107dadfa449e076045e3
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# CDDL HEADER START
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# The contents of this file are subject to the terms of the
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# Common Development and Distribution License (the "License").
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# You may not use this file except in compliance with the License.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# See the License for the specific language governing permissions
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# and limitations under the License.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# When distributing Covered Code, include this CDDL HEADER in each
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# If applicable, add the following below this CDDL HEADER, with the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# fields enclosed by brackets "[]" replaced with your own identifying
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# CDDL HEADER END
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync# Use is subject to license terms.
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync# ident "%Z%%M% %I% %E% SMI"
f11c4bc0c52722d9487aed3b0b7353131bee87acvboxsync# Function: check_add_drv()
f11c4bc0c52722d9487aed3b0b7353131bee87acvboxsync# This function will check if the module has an entry in etc/name_to_major
f11c4bc0c52722d9487aed3b0b7353131bee87acvboxsync# If not simply calls add_drv with the arguments given. If there is
f11c4bc0c52722d9487aed3b0b7353131bee87acvboxsync# such an entry in name_to_major file, it adds entries in driver_aliases
f11c4bc0c52722d9487aed3b0b7353131bee87acvboxsync# driver_classes and minor_perm if necessary.
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync# The syntax of this function is the same as add_drv.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync while getopts i:b:m:c:N opt
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync \?) echo "check_add_drv can not handle this option"
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync /usr/bin/grep "^$drvname[ ]" $BASEDIR/etc/name_to_major > /dev/null 2>&1
eval $cmd
if [ $ADD_ALIAS = 1 ]
if [ $? -ne 0 ]
if [ $ADD_CLASS = 1 ]
if [ $? -ne 0 ]
if [ $ADD_MINOR = 1 ]
if [ $? -ne 0 ]
echo $minorentry >> $BASEDIR/etc/minor_perm