i.seedmanifest revision d62bc4badc1c1f1549c961cfb8b420e650e1272b
649N/A#!/bin/sh
649N/A#
649N/A# CDDL HEADER START
649N/A#
943N/A# The contents of this file are subject to the terms of the
649N/A# Common Development and Distribution License (the "License").
649N/A# You may not use this file except in compliance with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A#
919N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
919N/A# Use is subject to license terms.
649N/A#
649N/A#ident "%Z%%M% %I% %E% SMI"
649N/A#
649N/A# i.seedmanifest - smf(5) service manifest install class action script
649N/A# for services that must be in the seed repository.
649N/A#
649N/A# PLEASE NOTE: Use of this CAS means that the SMF repository format cannot
649N/A# change, since it may need to modify an SMF repository on another system
649N/A# image. As such, any use of this CAS must be cleared with the SMF team.
649N/A#
649N/A
649N/Arepfile=$PKG_INSTALL_ROOT/etc/svc/repository.db
970N/A
977N/A#
970N/A# If the repository does not yet exist, create it from the appropriate seed.
970N/A#
970N/Aif [ ! -f $repfile ]; then
970N/A if [ -n "$SUNW_PKG_INSTALL_ZONENAME" -a \
970N/A "$SUNW_PKG_INSTALL_ZONENAME" != "global" ]; then
970N/A dbfile=nonglobal.db
649N/A else
649N/A dbfile=global.db
649N/A fi
649N/A
649N/A if [ -f $PKG_INSTALL_ROOT/lib/svc/seed/$dbfile ]; then
649N/A /usr/bin/cp $PKG_INSTALL_ROOT/lib/svc/seed/$dbfile $repfile
649N/A /usr/bin/chmod 0600 $repfile
649N/A /usr/bin/chown root:sys $repfile
649N/A fi
649N/A
649N/A #
649N/A # Since our service is in the seed, we're done.
970N/A #
970N/A exit 0
970N/Afi
649N/A
while read src dst; do
/usr/bin/cp -p $src $dst
SVCCFG_REPOSITORY=$repfile SVCCFG_CHECKHASH=1 \
/usr/sbin/svccfg import $dst
done
exit 0