postinstall revision 24dd95375a09d43fe4f6b55f6d5188f4bac4f68d
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
# Driver info
DRVALIAS='"pciex8086,4229" "pciex8086,4230"'
# Function: check_add_drv()
#
# This function will check if add_drv has been executed.
# If not simply calls add_drv. Otherwise adds entries to
# driver_aliases, driver_classes and minor_perm if necessary.
# The syntax of this function is the same as add_drv.
{
CMD="add_drv"
ALIAS=""
i) CMD="${CMD} -i ${OPTARG}"
;;
b) if [ "${OPTARG}" != "/" ]; then
# On a client
# modify the sytem files and touch
# /reconfigure for reconfigure reboot
CMD="${CMD} -b \"${OPTARG}\""
fi
;;
\?) echo "check_add_drv(): Unknown option $opt"
return
;;
esac
done
DRIVER=$1
CMD="${CMD} ${DRIVER}"
# Make sure add_drv has not been previously executed
# before attempting to add the driver
if [ $? -ne 0 ]; then
eval ${CMD}
if [ $? -ne 0 ]; then
echo "Failed add_drv ${DRIVER}!\n" >&2
exit 1
fi
else
# Add driver entry if necessary
if [ -n "${ALIAS}" ]; then
if [ $? -ne 0 ]; then
fi
done
fi
fi
}