postinstall revision 936b7af69172dce89b577831f79c0e18d15e854b
4778ff543a041ac356d6e661cc9b66c3fafa2092Adam Moore#!/bin/sh
b39897a381c2203466da5568bfd2862a54a81311Adam Moore#
b39897a381c2203466da5568bfd2862a54a81311Adam Moore# CDDL HEADER START
b39897a381c2203466da5568bfd2862a54a81311Adam Moore#
4778ff543a041ac356d6e661cc9b66c3fafa2092Adam Moore# The contents of this file are subject to the terms of the
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore# Common Development and Distribution License (the "License").
4778ff543a041ac356d6e661cc9b66c3fafa2092Adam Moore# You may not use this file except in compliance with the License.
4778ff543a041ac356d6e661cc9b66c3fafa2092Adam Moore#
8dabf64ce9f41685925f1076e4bb255fdb331230Adam Moore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
eb4d2f0e3ecc7405fcd029255385d486212f93d2Adam Moore# or http://www.opensolaris.org/os/licensing.
8dabf64ce9f41685925f1076e4bb255fdb331230Adam Moore# See the License for the specific language governing permissions
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore# and limitations under the License.
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore#
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore# When distributing Covered Code, include this CDDL HEADER in each
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
620e1cb97d3e8b1b9adae25b0f970778229d82feAdam Moore# If applicable, add the following below this CDDL HEADER, with the
620e1cb97d3e8b1b9adae25b0f970778229d82feAdam Moore# fields enclosed by brackets "[]" replaced with your own identifying
b39897a381c2203466da5568bfd2862a54a81311Adam Moore# information: Portions Copyright [yyyy] [name of copyright owner]
620e1cb97d3e8b1b9adae25b0f970778229d82feAdam Moore#
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore# CDDL HEADER END
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore#
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore#
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
b39897a381c2203466da5568bfd2862a54a81311Adam Moore# Use is subject to license terms.
b39897a381c2203466da5568bfd2862a54a81311Adam Moore#
b531009a6b05e19b5e364c9e50aca5e5829f2430Adam Moore#ident "%Z%%M% %I% %E% SMI"
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore#
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore
71faff7b11b42699cd2630a4c371fcec37e94517Adam MoorePATH="/usr/bin:/usr/sbin:${PATH}"
eb4d2f0e3ecc7405fcd029255385d486212f93d2Adam Mooreexport PATH
b39897a381c2203466da5568bfd2862a54a81311Adam Moore
b39897a381c2203466da5568bfd2862a54a81311Adam Mooreif [ "${BASEDIR:=/}" != "/" ]
b39897a381c2203466da5568bfd2862a54a81311Adam Moorethen
b39897a381c2203466da5568bfd2862a54a81311Adam Moore BASEDIR_OPT="-b $BASEDIR"
eb4d2f0e3ecc7405fcd029255385d486212f93d2Adam Moorefi
eb4d2f0e3ecc7405fcd029255385d486212f93d2Adam Moore
eb4d2f0e3ecc7405fcd029255385d486212f93d2Adam Mooreinstalled() {
2a6a74fd467e705aff9034cf1a7afb11a9adf894Adam Moore driver=$1
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
0c9749c3ca70539e41104900fede9cbfa4328678Adam Moore
408ac1e89b1808e0394007429b2ee3b2eb99004fAdam Moore return $?
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore}
71faff7b11b42699cd2630a4c371fcec37e94517Adam Moore
71faff7b11b42699cd2630a4c371fcec37e94517Adam MooreEXIT=0
48e03c7b640815d43811654e82225221564ada29Adam Moore
48e03c7b640815d43811654e82225221564ada29Adam Mooreif installed smp; then
48e03c7b640815d43811654e82225221564ada29Adam Moore echo "smp already installed" || EXIT=1
48e03c7b640815d43811654e82225221564ada29Adam Moore
48e03c7b640815d43811654e82225221564ada29Adam Mooreelse
48e03c7b640815d43811654e82225221564ada29Adam Moore add_drv ${BASEDIR_OPT} -m '* 0644 root sys' smp || \
48e03c7b640815d43811654e82225221564ada29Adam Moore EXIT=1
48e03c7b640815d43811654e82225221564ada29Adam Moorefi
48e03c7b640815d43811654e82225221564ada29Adam Moore
48e03c7b640815d43811654e82225221564ada29Adam Mooreexit $EXIT
48e03c7b640815d43811654e82225221564ada29Adam Moore