7082N/A#!/bin/sh
7082N/A#
7117N/A# CDDL HEADER START
7117N/A#
7117N/A# The contents of this file are subject to the terms of the
7117N/A# Common Development and Distribution License, Version 1.0 only
7117N/A# (the "License"). You may not use this file except in compliance
7117N/A# with the License.
7117N/A#
7117N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7117N/A# or http://www.opensolaris.org/os/licensing.
7117N/A# See the License for the specific language governing permissions
7117N/A# and limitations under the License.
7117N/A#
7117N/A# When distributing Covered Code, include this CDDL HEADER in each
7117N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7117N/A# If applicable, add the following below this CDDL HEADER, with the
7117N/A# fields enclosed by brackets "[]" replaced with your own identifying
7117N/A# information: Portions Copyright [yyyy] [name of copyright owner]
7117N/A#
7117N/A# CDDL HEADER END
7117N/A#
7117N/A#
7082N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
7082N/A# Use is subject to license terms.
7082N/A#
7117N/A#ident "@(#)i.manifest 1.6 05/06/08 SMI"
7082N/A#
7082N/A# i.manifest - smf(5) service manifest install class action script
7082N/A#
7082N/A
7117N/Arepfile=$PKG_INSTALL_ROOT/etc/svc/repository.db
7117N/Aexport repfile
7117N/A
7117N/A#
7117N/A# If the repository does not yet exist, create it from the appropriate seed. If
7117N/A# for some reason the seeds do not exist, svccfg(1M) will create the repository
7117N/A# automatically.
7117N/A#
7117N/Aif [ ! -f $repfile ]; then
7117N/A if [ -n "$SUNW_PKG_INSTALL_ZONENAME" -a \
7117N/A "$SUNW_PKG_INSTALL_ZONENAME" != "global" ]; then
7117N/A [ -f $PKG_INSTALL_ROOT/lib/svc/seed/nonglobal.db ] && \
7117N/A /usr/bin/cp $PKG_INSTALL_ROOT/lib/svc/seed/nonglobal.db \
7117N/A $repfile
7117N/A else
7117N/A [ -f $PKG_INSTALL_ROOT/lib/svc/seed/global.db ] && \
7117N/A /usr/bin/cp $PKG_INSTALL_ROOT/lib/svc/seed/global.db \
7117N/A $repfile
7117N/A fi
7117N/A /usr/bin/chmod 0600 $repfile
7117N/A /usr/bin/chown root:sys $repfile
7117N/Afi
7117N/A
7117N/Aif [ ! -r $PKG_INSTALL_ROOT/etc/svc/volatile/repository_door ]; then
7082N/A #
7117N/A # smf(5) is not presently running for the destination environment.
7117N/A # Since we presently cannot refresh without a running svc.startd(1M), we
7117N/A # cannot consistently handle dependent placement. Defer to next boot.
7082N/A #
7082N/A while read src dst; do
7082N/A /usr/bin/cp -p $src $dst
7082N/A done
7117N/Aelse
7082N/A #
7117N/A # Local package install.
7082N/A #
7082N/A while read src dst; do
7082N/A /usr/bin/cp -p $src $dst
7082N/A
7117N/A [ "$PKG_INSTALL_ROOT" = "" -o "$PKG_INSTALL_ROOT" = "/" ] && \
7117N/A SVCCFG_CHECKHASH=1 /usr/sbin/svccfg import $dst
7082N/A done
7082N/Afi
7082N/A
7082N/Aexit 0