2573N/A.. The contents of this file are subject to the terms of the
2573N/A Common Development and Distribution License (the "License").
2573N/A You may not use this file except in compliance with the License.
2573N/A See the License for the specific language governing permissions
2573N/A and limitations under the License.
2573N/A.. When distributing Covered Code, include this CDDL HEADER in each
2573N/A If applicable, add the following below this CDDL HEADER, with the
2573N/A fields enclosed by brackets "[]" replaced with your own identifying
2573N/A information: Portions Copyright [yyyy] [name of copyright owner]
2573N/A.. Copyright (c) 2011, Oracle
and/or its affiliates. All rights reserved.
2573N/AUsing SMF to generate side effects
2573N/A..................................
2573N/AThis chapter explains how to use the Service Management Framework to
2573N/Aautomatically handle any necessary side effects of package installation.
2562N/AThe package developer must determine which actions, when initially installed or
2562N/Achanged, should cause a side effect to the system. For each of those actions,
2573N/Athe package developer needs to determine which existing service provides the
2573N/Adesired side effect, or write a new service which provides the needed
2573N/Afunctionality and ensure that service is delivered to the system.
2573N/AWhen the set of actions has been determined, those actions must be tagged in
2573N/Athe package manifest with the correct *actuator* in order to cause that side
2573N/AAs discussed in *Chapter 1* some side effects will be needed to employ the
2573N/A*software self-assembly* concept used by Solaris and IPS, but they are not
2573N/AWe'll discuss the available actuators in the next section and then provide some
2573N/AThe following tags can be added to any action in a manifest:
2573N/AThis actuator takes the value 'true' or 'false', declaring that installation,
2573N/Aremoval or update of the tagged action should require a reboot when IPS is
2573N/AThe following actuators are related to SMF services, and are the ones we will
2573N/AThe actuators take a single SMF FMRI as a value, possibly including globbing
2573N/Acharacters to match multiple FMRIs. If the same FMRI is tagged by multiple
2573N/Aactions, possibly across multiple packages being operated on, IPS will only
2573N/AWe will list the actuators below:
2573N/A A service that should be disabled prior to the package operation
2573N/A A service that should be refreshed after the package operation has
2573N/A A service that should be restarted after the package operation has
2573N/A A service that should be temporarily suspended prior to the package
2573N/A operation and enabled once it has completed
2573N/AA common example of needing a side effect, is when a package delivers a new SMF
2573N/Aservice. The package delivers the SMF manifest file and method script and the
2573N/Apackaged application requires that the SMF service it delivers must be available
2573N/AIn older Solaris releases, SVR4 post-install scripting would run an SMF command
2573N/AThe actuator ensures that when the manifest is added, updated, or removed, the
2573N/A``manifest-import`` service is restarted causing the service delivered by that
2573N/ASMF manifest to be added, updated, or removed.
2573N/AIf the package is added to a live-system, this action is performed once all
2573N/Apackages have been added to the system during that packaging operation. If the
2573N/Apackage is added to an alternate boot environment, this action is performed
2573N/Aduring the first boot of that boot environment.
2573N/AXXX the following section names are bad, need to rename. May need more examples
2573N/AA service that runs once on boot, then deletes itself
2573N/A~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2573N/AXXX need content, and look for a good example