postinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#!/bin/sh
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License, Version 1.0 only
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# (the "License"). You may not use this file except in compliance
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# ident "%Z%%M% %I% %E% SMI"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (c) 2001 by Sun Microsystems, Inc.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# identify this package for uninstallation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweREGTAG=$PKGINST
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMOF=Solaris_Performance1.0.mof
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJAR=perfprovider.jar
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweTMPMOF=/tmp/$MOF
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweWBEM_BASEDIR=/ # set default
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweUSRSADM=$WBEM_BASEDIR/usr/sadm
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMOFDIR=$USRSADM/mof
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJARDIR=$USRSADM/lib/wbem
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecat << EOF > $TMPMOF
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#pragma namespace("root/system")
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#pragma namespace("__create")
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstance of Solaris_ProviderPath {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe pathurl = "file://$JARDIR/$JAR";
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe};
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#pragma namespace("root/cimv2")
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#pragma namespace("__create")
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#pragma include("$MOFDIR/$MOF")
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweEOF
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This won't work in the diskless client scenario...
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# /usr/sadm/bin/mofreg -r $REGTAG $TMPMOF
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# ...but we can do mofreg's work manually to avoid the problem.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweREGDIR=$PKG_INSTALL_ROOT/var/sadm/wbem/logr/preReg/$REGTAG
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowemkdir -p $REGDIR
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecp $TMPMOF $REGDIR
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowerm $TMPMOF
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe