postinstall revision b86efd96f8acd85ddaa930a2f0c1d664237e4aaf
2ronwalf#!/bin/sh
2ronwalf#
2ronwalf# CDDL HEADER START
2ronwalf#
2ronwalf# The contents of this file are subject to the terms of the
2ronwalf# Common Development and Distribution License (the "License").
2ronwalf# You may not use this file except in compliance with the License.
2ronwalf#
2ronwalf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2ronwalf# or http://www.opensolaris.org/os/licensing.
2ronwalf# See the License for the specific language governing permissions
2ronwalf# and limitations under the License.
2ronwalf#
2ronwalf# When distributing Covered Code, include this CDDL HEADER in each
2ronwalf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2ronwalf# If applicable, add the following below this CDDL HEADER, with the
2ronwalf# fields enclosed by brackets "[]" replaced with your own identifying
2ronwalf# information: Portions Copyright [yyyy] [name of copyright owner]
2ronwalf#
2ronwalf# CDDL HEADER END
2ronwalf#
2ronwalf#
2ronwalf# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2ronwalf# Use is subject to license terms.
2ronwalf#
2ronwalf#ident "%Z%%M% %I% %E% SMI"
2ronwalf
2ronwalfPATH="/usr/bin:/usr/sbin:/sbin:${PATH}"
2ronwalfexport PATH
2ronwalfRDS_SOCK_ENTRY=" 30 1 0 /dev/rds"
2ronwalf
2ronwalfif [ "${BASEDIR:=/}" != "/" ]
2ronwalfthen
2ronwalf BASEDIR_OPT="-b $BASEDIR"
2ronwalffi
2ronwalf
2ronwalfnot_installed() {
2ronwalf driver=$1
2ronwalf grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
2ronwalf return $?
2ronwalf}
2ronwalf
2ronwalfEXIT=0
2ronwalf
2ronwalfnot_installed rds || add_drv ${BASEDIR_OPT} -m '* 0644 root sys' rds || EXIT=1
2ronwalf
2ronwalfnot_installed rdsib || add_drv ${BASEDIR_OPT} -m '* 0644 root sys' \
2ronwalf rdsib || EXIT=1
2ronwalf
2ronwalf# Check rds entry exists in sock2path
2ronwalfegrep "$RDS_SOCK_ENTRY" $BASEDIR/etc/inet/sock2path > /dev/null 2>&1
2ronwalfif [ $? -ne 0 ]
2ronwalfthen
2ronwalf echo "$RDS_SOCK_ENTRY" >> $BASEDIR/etc/inet/sock2path
2ronwalf if [ "${BASEDIR:=/}" = "/" ]
2ronwalf then
2ronwalf soconfig $RDS_SOCK_ENTRY || EXIT=1
2ronwalf fi
2ronwalffi
2ronwalf
2ronwalfexit $EXIT
2ronwalf