Go to main content

Packaging and Delivering Software With the Image Packaging System in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Delivering an SMF Service

To deliver a new SMF service, create a package that delivers the SMF manifest file and method script. On the manifest file action, include the following actuator to restart the manifest import service to re-read all service manifests on the system.

restart_fmri=svc:/system/manifest-import:default

This actuator ensures that when the manifest is added, updated, or removed, the manifest-import service is restarted, causing the service delivered by that SMF manifest to be added, updated, or removed.

The following example shows a complete file action with a restart_fmri attribute:

file lib/svc/manifest/network/network-ipmgmt.xml \
    path=lib/svc/manifest/network/network-ipmgmt.xml \
    group=sys mode=0444 owner=root \
    restart_fmri=svc:/system/manifest-import:default

If the package is added to a live system, this action is performed once all packages have been added to the system during that packaging operation. If the package is added to an alternate boot environment, this action is performed during the first boot of that boot environment.

If the environment where the package is installed has immutable non-global zones, a reboot is required to install new directories in the immutable zone. Immutable zones boot as far as the svc:/milestone/self-assembly-complete:default milestone in read/write mode, before rebooting read-only. Delivering a Service that Runs Once shows how to make your service a dependency of the self-assembly-complete milestone service.