i.manifest revision 7082
7082N/A#!/bin/sh
7082N/A#
7082N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
7082N/A# Use is subject to license terms.
7082N/A#
7082N/A#ident "@(#)i.manifest 1.2 04/07/30 SMI"
7082N/A#
7082N/A# i.manifest - smf(5) service manifest install class action script
7082N/A#
7082N/A
7082N/Aif [ "$LUBIN" != "" ]; then
7082N/A #
7082N/A # Live Upgrade. Unsafe to import service manifests;
7082N/A # defer to next boot.
7082N/A #
7082N/A while read src dst; do
7082N/A /usr/bin/cp -p $src $dst
7082N/A done
7082N/Aelif [ ! -x /usr/sbin/svccfg ]; then
7082N/A #
7082N/A # Installing system does not have smf(5); unable to import
7082N/A # service manifests.
7082N/A #
7082N/A while read src dst; do
7082N/A /usr/bin/cp -p $src $dst
7082N/A done
7082N/Aelif [ "$PKG_INSTALL_ROOT" != "" -a "$PKG_INSTALL_ROOT" != "/" ]; then
7082N/A #
7095N/A # Installing from equivalent versioned system with
7082N/A # smf(5) installed, but to alternate location. (Boot
7082N/A # from net or disk image.)
7082N/A #
7082N/A while read src dst; do
7082N/A /usr/bin/cp -p $src $dst
7082N/A
7082N/A SVCCFG_REPOSITORY=$PKG_INSTALL_ROOT/etc/svc/repository.db \
7082N/A SVCCFG_CHECKHASH=1 \
7082N/A /usr/sbin/svccfg import $dst
7082N/A done
7082N/Aelse
7082N/A #
7082N/A # Local package install. Verify that smf(5) is running; if not,
7082N/A # manifest will be ignored or imported at next boot.
7082N/A #
7082N/A if [ -r /etc/svc/volatile/repository_door ]; then
7082N/A while read src dst; do
7082N/A /usr/bin/cp -p $src $dst
7082N/A SVCCFG_CHECKHASH=1 \
7082N/A /usr/sbin/svccfg import $dst
7082N/A done
8392N/A fi
8282N/Afi
7082N/A
7082N/Aexit 0
7082N/A