diff options
author | jperkin <jperkin@pkgsrc.org> | 2014-03-11 14:07:04 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2014-03-11 14:07:04 +0000 |
commit | 6bcea5495c4b03080e1f7cff4f0d1898590b2317 (patch) | |
tree | 6464ad66f5d7dfca0c818bc70f388001084df9fd /mk/install | |
parent | 071ea796c1307e737cc3101448aa934353fe247c (diff) | |
download | pkgsrc-6bcea5495c4b03080e1f7cff4f0d1898590b2317.tar.gz |
Introduce infrastructure support for SMF.
SMF is the Service Management Facility, the default init system in
Solaris and derivatives since version 10. This adds "smf" to the list
of supported INIT_SYSTEM types, and makes it the default init system on
platforms where it is available.
Packages can introduce SMF support by providing a manifest file, by
default located in ${FILESDIR}/smf/manifest.xml but manifests under
${WRKSRC} can be used too if the package source includes one.
SMF method scripts are supported too if required, using SMF_METHODS in a
similar manner to RCD_SCRIPTS.
Many parts of the SMF infrastructure are configurable, see mk/smf.mk for
the full details.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/install-smf | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mk/install/install-smf b/mk/install/install-smf new file mode 100644 index 00000000000..30aa994b2c2 --- /dev/null +++ b/mk/install/install-smf @@ -0,0 +1,40 @@ +# $NetBSD: install-smf,v 1.1 2014/03/11 14:07:04 jperkin Exp $ +# +# Print post-install messages instructing the user how to handle the +# newly-installed SMF services. +# + +case ${STAGE} in +POST-INSTALL) + cat <<EOF +============================================================================ +This package has SMF support. You may use svcadm(1M) to 'enable', 'disable' +or 'restart' services. To enable the instance(s) for this package, run: + +EOF + for svc in @SMF_INSTANCES@; do + cat <<EOF + /usr/sbin/svcadm enable svc:/@SMF_PREFIX@/@SMF_NAME@:${svc} +EOF + done + cat <<EOF + +Use svcs(1) to check on service status. See smf(5) for more information. +EOF + if [ -z "${PKG_SKIP_SMF}" ]; then + /usr/sbin/svccfg import ${PKG_PREFIX}/@SMF_MANIFEST_FILE@ + else + cat <<EOF + +The PKG_SKIP_SMF variable was set, automatic import of SMF manifests was +skipped. You must import the SMF manifest first with: + + /usr/sbin/svccfg import ${PKG_PREFIX}/@SMF_MANIFEST_FILE@ + +EOF + fi + cat <<EOF +============================================================================ +EOF + ;; +esac |