preinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
5cd4555ad444fd391002ae32450572054369fd42Rob Austein# CDDL HEADER START
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson# The contents of this file are subject to the terms of the
26e2a07a0b6a3b1eccef82ba31270d0c54ad4f06Mark Andrews# Common Development and Distribution License, Version 1.0 only
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# (the "License"). You may not use this file except in compliance
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson# with the License.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson# or http://www.opensolaris.org/os/licensing.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# CDDL HEADER END
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Copyright %G% Sun Microsystems, Inc. All Rights Reserved.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#pragma ident "%Z%%M% %I% %E% SMI"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# preinstall script for package: SUNWmibii
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Exit codes for installation scripts
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeine_fatal=1 # stop installation on this exit
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeine_warning=2 # Installation will go on.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeine_int=3 # Interrupted. Stop installation
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeine_reboot=10 # User must reboot after installation of all selected packages
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeine_rebootnow=20 # User must reboot right after installation of current package
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein # To be added to one of the single-digit exit code above
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Trap interrupt
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeintrap `exit $e_int` 15
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Stop running process(es)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinif [ ${BASEDIR} = "/" ]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein # In case it is not stopped
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein wpid=`$PS -fe | $GREP mibiisa | $GREP -v grep | $AWK '{print $2}'`
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if [ -n "$wpid" ]