postinstall revision 88447a05f537aabe9a1bc3d5313f22581ec992a7
359N/A#! /bin/sh
359N/A#
359N/A# CDDL HEADER START
359N/A#
359N/A# The contents of this file are subject to the terms of the
359N/A# Common Development and Distribution License (the "License").
359N/A# You may not use this file except in compliance with the License.
359N/A#
359N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
359N/A# or http://www.opensolaris.org/os/licensing.
359N/A# See the License for the specific language governing permissions
359N/A# and limitations under the License.
359N/A#
359N/A# When distributing Covered Code, include this CDDL HEADER in each
359N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
359N/A# If applicable, add the following below this CDDL HEADER, with the
359N/A# fields enclosed by brackets "[]" replaced with your own identifying
359N/A# information: Portions Copyright [yyyy] [name of copyright owner]
359N/A#
359N/A# CDDL HEADER END
844N/A#
359N/A#
359N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
359N/A# Use is subject to license terms.
359N/A#
359N/A#
618N/A# SUNWaudiohd postinstall script
359N/A
359N/APATH=/usr/bin:/usr/sbin:${PATH}
844N/Aexport PATH
844N/A
359N/Anot_installed() {
1273N/A driver=$1
359N/A grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
359N/A return $?
359N/A}
359N/A
359N/Aupdate_driver() {
359N/A driver=$1
359N/A aliases=$2
359N/A for alias in ${aliases}
359N/A do
359N/A egrep "^${driver}[ ]+${alias}" ${BASEDIR}/etc/driver_aliases>/dev/null 2>&1
359N/A if [ $? -ne 0 ]
359N/A then
359N/A echo "${driver} ${alias}" >> ${BASEDIR}/etc/driver_aliases
359N/A fi
359N/A done
359N/A}
359N/A
359N/AEXIT=0
359N/A
359N/AAUDIOHD_ALIASES="\
359N/A \"pci8086,2668\" \
\"pci10de,371\" \
\"pciclass,0403\" \
\"pciexclass,0403\"\
"
case "${ARCH}" in
i386)
not_installed audiohd
if [ $? -ne 0 ]
then
add_drv -b "${BASEDIR}" -i "${AUDIOHD_ALIASES}" -n audiohd || EXIT=1
else
update_driver audiohd "${AUDIOHD_ALIASES}" || EXIT=1
fi
;;
esac
exit ${EXIT}