postinstall revision 2fcbc377041d659446ded306a92901b4b0753b68
146N/A#!/bin/sh
146N/A#
146N/A# CDDL HEADER START
146N/A#
146N/A# The contents of this file are subject to the terms of the
146N/A# Common Development and Distribution License (the "License").
146N/A# You may not use this file except in compliance with the License.
146N/A#
146N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
146N/A# or http://www.opensolaris.org/os/licensing.
146N/A# See the License for the specific language governing permissions
146N/A# and limitations under the License.
146N/A#
146N/A# When distributing Covered Code, include this CDDL HEADER in each
146N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
146N/A# If applicable, add the following below this CDDL HEADER, with the
146N/A# fields enclosed by brackets "[]" replaced with your own identifying
146N/A# information: Portions Copyright [yyyy] [name of copyright owner]
146N/A#
146N/A# CDDL HEADER END
146N/A#
146N/A
146N/A#
146N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
146N/A# Use is subject to license terms.
146N/A#
146N/A# ident "%Z%%M% %I% %E% SMI"
146N/A
146N/APATH="/usr/bin:/usr/sbin:${PATH}"
146N/Aexport PATH
146N/A
146N/Aif [ "${BASEDIR:=/}" != "/" ]
146N/Athen
146N/A BASEDIR_OPT="-b $BASEDIR"
146N/Afi
146N/A
146N/Ainstalled() {
146N/A driver=$1
146N/A grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
146N/A
146N/A return $?
146N/A}
146N/A
146N/AEXIT=0
146N/A
146N/Aif installed ahci; then
146N/A echo "ahci already installed" || EXIT=1
146N/A
146N/Aelse
146N/A add_drv -i \
146N/A '"pciclass,010601"' \
146N/A ${BASEDIR_OPT} -m '* 0644 root sys' ahci || \
146N/A EXIT=1
146N/Afi
146N/A
146N/Aexit $EXIT
146N/A