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