postinstall revision 911106dfb16696472af8c1b7b4c554a829354fa8
2605N/A#
2605N/A# CDDL HEADER START
2605N/A#
2605N/A# The contents of this file are subject to the terms of the
2605N/A# Common Development and Distribution License (the "License").
2605N/A# You may not use this file except in compliance with the License.
2605N/A#
2605N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2605N/A# or http://www.opensolaris.org/os/licensing.
2605N/A# See the License for the specific language governing permissions
2605N/A# and limitations under the License.
2605N/A#
2605N/A# When distributing Covered Code, include this CDDL HEADER in each
2605N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2605N/A# If applicable, add the following below this CDDL HEADER, with the
2605N/A# fields enclosed by brackets "[]" replaced with your own identifying
2605N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2605N/A#
2605N/A# CDDL HEADER END
2605N/A#
2605N/A#
2605N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3769N/A# Use is subject to license terms.
2605N/A#
4070N/A# ident "%Z%%M% %I% %E% SMI"
2605N/A#
4070N/A
4070N/APATH="/usr/bin:/usr/sbin:${PATH}"
4070N/Aexport PATH
2605N/A
2605N/APKG_NAME=SUNWvscanr
4070N/ADRV=vscan
4070N/ADRVPERM='* 0640 root sys'
4070N/A
2605N/AADD_DRV=/usr/sbin/add_drv
2605N/A
2605N/A#
4070N/A# Check if the BASEDIR option is needed
2605N/A#
2605N/Aif [ "${BASEDIR}" = "/" ]; then
4070N/A ADD_DRV_FLAGS=""
4070N/A NAME_TO_MAJOR="/etc/name_to_major"
4070N/Aelse
4070N/A ADD_DRV_FLAGS="-b ${BASEDIR}"
4070N/A NAME_TO_MAJOR="${BASEDIR}/etc/name_to_major"
4070N/Afi
4070N/A
4070N/A#
4070N/A# Make sure add_drv has not been previously executed before attempting
4070N/A# to add the driver
4070N/A#
4070N/Agrep "^${DRV} " ${NAME_TO_MAJOR} > /dev/null 2>&1
4070N/Aif [ $? -ne 0 ]; then
4070N/A ${ADD_DRV} ${ADD_DRV_FLAGS} -m "${DRVPERM}" ${DRV}
4070N/A if [ $? -ne 0 ]; then
4070N/A echo "${PKG_NAME}: add_drv ${DRV} failed\n" >&2
4070N/A exit 1
4070N/A fi
4070N/Afi
4070N/A
4070N/Aexit 0
4070N/A