postremove revision 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd
4632N/A#!/bin/sh
4763N/A#
4632N/A# CDDL HEADER START
4632N/A#
4632N/A# The contents of this file are subject to the terms of the
4632N/A# Common Development and Distribution License (the "License").
4632N/A# You may not use this file except in compliance with the License.
4632N/A#
4632N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4632N/A# or http://www.opensolaris.org/os/licensing.
4632N/A# See the License for the specific language governing permissions
4632N/A# and limitations under the License.
4632N/A#
4632N/A# When distributing Covered Code, include this CDDL HEADER in each
4632N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4632N/A# If applicable, add the following below this CDDL HEADER, with the
4632N/A# fields enclosed by brackets "[]" replaced with your own identifying
4632N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4632N/A#
4632N/A# CDDL HEADER END
4632N/A#
4632N/A#
4632N/A#ident "%Z%%M% %I% %E% SMI"
4632N/A#
4632N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4632N/A# Use is subject to license terms.
4632N/A#
4632N/A# SUNWcpr postremove script
4632N/A
4632N/A#
4632N/A# Unload old copy of cpr from system
4632N/A# In the current version of x86, none of the files to be removed will exist
4632N/A#
4632N/A
4632N/ACPRLOWER="${PKG_INSTALL_ROOT}/.cpr_generic_info \
4632N/A ${PKG_INSTALL_ROOT}/.cpr_turbo_info \
4632N/A ${PKG_INSTALL_ROOT}/.cpr_defaultboot_info \
4632N/A ${PKG_INSTALL_ROOT}/.cpr_config \
4632N/A ${PKG_INSTALL_ROOT}/.cpr_default"
4763N/ACPRFILES="${CPRLOWER} ${PKG_INSTALL_ROOT}/.CPR_TB ${PKG_INSTALL_ROOT}/.CPR"
4763N/A
4763N/Aif [ "$BASEDIR" = "/" ] ; then
4763N/A old_cpr=`/usr/sbin/modinfo | grep -w "cpr" | awk '{print $1}'`
4763N/A if [ "X${old_cpr}" != "X" ] ; then
4763N/A /usr/sbin/modunload -i ${old_cpr}
4763N/A fi
4763N/A
4632N/A if [ -s ${PKG_INSTALL_ROOT}/etc/power.conf ]; then
4632N/A state_filesystem=`/usr/bin/grep "^[ ]*statefile[ ]" \
4632N/A ${PKG_INSTALL_ROOT}/etc/power.conf`
4632N/A if [ "X${state_filesystem}" != "X" ] ; then
4632N/A set - ${state_filesystem}
4632N/A CPRSF=${PKG_INSTALL_ROOT}/"$2"
4632N/A fi
4632N/A fi
4632N/A
4632N/A rm -f ${CPRFILES} ${CPRSF}
4632N/Afi
4632N/A
4632N/Aexit 0
4632N/A