summaryrefslogtreecommitdiff
path: root/mk/install/install-smf
blob: 30aa994b2c215179f2f739aa5f7bc087d64ace8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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