summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-03-11 14:34:36 +0000
committerjperkin <jperkin@pkgsrc.org>2014-03-11 14:34:36 +0000
commit76740313a3ac624b6ff51288f485f40d39d80cb1 (patch)
tree7ee5b13abb9f96749121a307db970b8b85e953da /net
parent6bcea5495c4b03080e1f7cff4f0d1898590b2317 (diff)
downloadpkgsrc-76740313a3ac624b6ff51288f485f40d39d80cb1.tar.gz
Import initial SMF support for individual packages.
Diffstat (limited to 'net')
-rw-r--r--net/bind98/Makefile3
-rw-r--r--net/bind98/files/smf/manifest.xml141
-rw-r--r--net/bind98/files/smf/named.sh117
-rw-r--r--net/bind99/Makefile3
-rw-r--r--net/bind99/files/smf/manifest.xml141
-rw-r--r--net/bind99/files/smf/named.sh117
-rw-r--r--net/dnsmasq/files/smf/manifest.xml38
-rw-r--r--net/haproxy/files/smf/manifest.xml29
-rw-r--r--net/mDNSResponder/files/smf/manifest.xml30
-rw-r--r--net/nagios-base/Makefile5
-rw-r--r--net/nagios-base/files/smf/manifest.xml32
-rw-r--r--net/nagios-nrpe/Makefile6
-rw-r--r--net/nagios-nrpe/files/smf/manifest.xml33
-rw-r--r--net/net-snmp/Makefile3
-rw-r--r--net/net-snmp/files/smf/manifest.xml45
-rw-r--r--net/proftpd/files/smf/manifest.xml33
-rw-r--r--net/rabbitmq/Makefile6
-rw-r--r--net/rabbitmq/files/smf/manifest.xml36
-rw-r--r--net/rsync/Makefile3
-rw-r--r--net/rsync/files/smf/manifest.xml29
-rw-r--r--net/spread/files/smf/manifest.xml35
21 files changed, 878 insertions, 7 deletions
diff --git a/net/bind98/Makefile b/net/bind98/Makefile
index 253f267b328..bb28676a846 100644
--- a/net/bind98/Makefile
+++ b/net/bind98/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2014/02/12 23:18:19 tron Exp $
+# $NetBSD: Makefile,v 1.37 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= bind-${BIND_VERSION}
PKGNAME= ${DISTNAME:S/-P/pl/}
@@ -69,6 +69,7 @@ PLIST.inet6= yes
.endif
RCD_SCRIPTS= lwresd named9
+SMF_METHODS= named
INSTALLATION_DIRS= ${DOCDIR} share/doc/bind9/arm share/doc/bind9/misc
diff --git a/net/bind98/files/smf/manifest.xml b/net/bind98/files/smf/manifest.xml
new file mode 100644
index 00000000000..6e35cf26498
--- /dev/null
+++ b/net/bind98/files/smf/manifest.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<!--
+CDDL HEADER START
+
+The contents of this file are subject to the terms of the
+Common Development and Distribution License (the "License").
+You may not use this file except in compliance with the License.
+
+You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+or http://www.opensolaris.org/os/licensing.
+See the License for the specific language governing permissions
+and limitations under the License.
+
+When distributing Covered Code, include this CDDL HEADER in each
+file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+If applicable, add the following below this CDDL HEADER, with the
+fields enclosed by brackets "[]" replaced with your own identifying
+information: Portions Copyright [yyyy] [name of copyright owner]
+
+CDDL HEADER END
+-->
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ Use is subject to license terms.
+
+ ident "@(#)server.xml 1.8 07/06/19 SMI"
+-->
+<!-- Portions Copyright 2007 Vedran Bender -->
+<service_bundle type='manifest' name='@SMF_NAME@'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <dependency name='filesystem_minimal' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+ <dependency name='loopback' grouping='require_any' restart_on='error' type='service'>
+ <service_fmri value='svc:/network/loopback' />
+ </dependency>
+ <dependency name='network' grouping='optional_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/network' />
+ </dependency>
+ <dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
+ <service_fmri value='file://localhost@PKG_SYSCONFDIR@/named.conf' />
+ </dependency>
+ <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
+ <!--
+ In order to run multiple named(1M) processes with their own
+ configuration file or properties each must have a unique
+ instance.
+ -->
+ <instance name='default' enabled='false'>
+ <exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.named@ %m %i' timeout_seconds='60'>
+ <method_context>
+ <!--
+ privileges: (see privileges(5) and /etc/security/priv_names)
+ file_dac_read, file_dac_search:
+ Necessary for reading the configuration file
+ even it is restricted by the file permission.
+ net_privaddr:
+ Bind to a privileged port number.
+ sys_resource:
+ Permit the setting of resource limits (eg. stack
+ size).
+ proc_chroot:
+ Permit use of chroot(2).
+ -->
+ <method_credential user='root' group='root' privileges='basic,!proc_session,!proc_info,!file_link_any,net_privaddr,file_dac_read,file_dac_search,sys_resource,proc_chroot' />
+ </method_context>
+ </exec_method>
+ <!--
+ SIGHUP causes named to reread its configuration file, but not any
+ of the properties below.
+ -->
+ <exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60'>
+ <method_context />
+ </exec_method>
+ <property_group name='general' type='framework'>
+ <!-- manage DNS server state -->
+ <propval name='action_authorization' type='astring' value='solaris.smf.manage.bind' />
+ <propval name='value_authorization' type='astring' value='solaris.smf.manage.bind' />
+ </property_group>
+ <!-- Default property settings for named(1M) instance. -->
+ <property_group name='options' type='application'>
+ <!--
+ server: specifies an alternative server command. If
+ not specified the default /usr/sbin/named is used.
+ -->
+ <propval name='server' type='astring' value='' />
+ <!--
+ configuration_file: specifies an alternative
+ configuration file to be used. The property is similar
+ to named(1M) command line option '-c'
+ -->
+ <propval name='configuration_file' type='astring' value='' />
+ <!--
+ ip_interfaces: specifies which IP transport BIND will
+ transmit on. Possible values are 'IPv4' or 'IPv6'. Any
+ other setting assumes 'all', the default.
+ Equivalent command line option '-4' or '-6'.
+ -->
+ <propval name='ip_interfaces' type='astring' value='all' />
+ <!--
+ listen_on_port: Specifies the default UDP and TCP port
+ which will be used to listen for DNS requests.
+ Equivalent command line option '-p <integer>'.
+ -->
+ <propval name='listen_on_port' type='integer' value='0' />
+ <!--
+ debug_level: Specifies the default debug level. The
+ default is 0; no debugging. The Higher the number the
+ more verbose debug information becomes.
+ Equivalent command line option '-d <integer>'.
+ -->
+ <propval name='debug_level' type='integer' value='0' />
+ <!--
+ threads: Specifies the number of cpu worker threads to
+ create. The default of 0 causes named to try and
+ determine the number of CPUs present and create one
+ thread per CPU.
+ Equivalent command line option '-n <integer>'.
+ -->
+ <propval name='threads' type='integer' value='0' />
+ <!--
+ chroot_dir: Change the root directory using chroot(2)
+ to directory after processing the command line
+ arguments, but before reading the configuration file.
+ Equivalent command line option '-t <pathname>'.
+ -->
+ <propval name='chroot_dir' type='astring' value='' />
+ </property_group>
+ </instance>
+ <stability value='Unstable' />
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>BIND DNS server</loctext>
+ </common_name>
+ <documentation>
+ <manpage title='named' section='1M' manpath='@PREFIX@/@PKGMANDIR@' />
+ </documentation>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/bind98/files/smf/named.sh b/net/bind98/files/smf/named.sh
new file mode 100644
index 00000000000..49a2da36913
--- /dev/null
+++ b/net/bind98/files/smf/named.sh
@@ -0,0 +1,117 @@
+#!@SMF_METHOD_SHELL@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "@(#)dns-server.sh 1.1 07/03/26 SMI"
+
+# smf_method(5) start/stop script required for server DNS
+
+. /lib/svc/share/smf_include.sh
+
+result=${SMF_EXIT_OK}
+
+# Read command line arguments
+method="$1" # %m
+instance="$2" # %i
+
+# Set defaults; SMF_FMRI should have been set, but just in case.
+if [ -z "$SMF_FMRI" ]; then
+ SMF_FMRI="svc:/@SMF_PREFIX@/@SMF_NAME@:${instance}"
+fi
+server="@PREFIX@/sbin/named"
+I=`/usr/bin/basename $0`
+
+case "$method" in
+'start')
+ cmdopts=""
+ properties="debug_level ip_interfaces listen_on_port
+ threads chroot_dir configuration_file server"
+
+ for prop in $properties
+ do
+ value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
+ if [ -z "${value}" -o "${value}" = '""' ]; then
+ continue;
+ fi
+
+ case $prop in
+ 'debug_level')
+ if [ ${value} -gt 0 ]; then
+ cmdopts="${cmdopts} -d ${value}"
+ fi
+ ;;
+ 'ip_interfaces')
+ case ${value} in
+ 'IPv4')
+ cmdopts="${cmdopts} -4";;
+ 'IPv6')
+ cmdopts="${cmdopts} -6";;
+ 'all')
+ : # Default is all, therefore ignore.
+ ;;
+ *)
+ echo "$I: Unrecognised value in service instance property" >&2
+ echo "$I: options/${prop} : ${value}" >&2
+ ;;
+ esac
+ ;;
+ 'listen_on_port')
+ if [ ${value} -gt 0 ]; then
+ cmdopts="${cmdopts} -p ${value}"
+ fi
+ ;;
+ 'threads')
+ if [ ${value} -gt 0 ]; then
+ cmdopts="${cmdopts} -n ${value}"
+ fi
+ ;;
+ 'chroot_dir')
+ cmdopts="${cmdopts} -t ${value}"
+ ;;
+ 'configuration_file')
+ cmdopts="${cmdopts} -c ${value}"
+ ;;
+ 'server')
+ set -- `echo ${value} | /usr/bin/sed -e 's/\\\\//g'`
+ server=$@
+ ;;
+ esac
+ done
+
+ if [ ${result} = ${SMF_EXIT_OK} ]; then
+ echo "$I: Executing: ${server} ${cmdopts}"
+ # Execute named(1M) with relevant command line options.
+ ${server} ${cmdopts}
+ result=$?
+ fi
+ ;;
+'stop')
+ smf_kill_contract ${contract} TERM 1
+ [ $? -ne 0 ] && exit 1
+ ;;
+*)
+ echo "Usage: $I [stop|start] <instance>" >&2
+ exit 1
+ ;;
+esac
+exit ${result}
diff --git a/net/bind99/Makefile b/net/bind99/Makefile
index 25ff5001537..868a31ca902 100644
--- a/net/bind99/Makefile
+++ b/net/bind99/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2014/02/12 23:18:19 tron Exp $
+# $NetBSD: Makefile,v 1.34 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= bind-${BIND_VERSION}
PKGNAME= ${DISTNAME:S/-P/pl/}
@@ -67,6 +67,7 @@ PLIST.inet6= yes
.endif
RCD_SCRIPTS= lwresd named9
+SMF_METHODS= named
INSTALLATION_DIRS= ${DOCDIR} share/doc/bind9/arm
diff --git a/net/bind99/files/smf/manifest.xml b/net/bind99/files/smf/manifest.xml
new file mode 100644
index 00000000000..6e35cf26498
--- /dev/null
+++ b/net/bind99/files/smf/manifest.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<!--
+CDDL HEADER START
+
+The contents of this file are subject to the terms of the
+Common Development and Distribution License (the "License").
+You may not use this file except in compliance with the License.
+
+You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+or http://www.opensolaris.org/os/licensing.
+See the License for the specific language governing permissions
+and limitations under the License.
+
+When distributing Covered Code, include this CDDL HEADER in each
+file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+If applicable, add the following below this CDDL HEADER, with the
+fields enclosed by brackets "[]" replaced with your own identifying
+information: Portions Copyright [yyyy] [name of copyright owner]
+
+CDDL HEADER END
+-->
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ Use is subject to license terms.
+
+ ident "@(#)server.xml 1.8 07/06/19 SMI"
+-->
+<!-- Portions Copyright 2007 Vedran Bender -->
+<service_bundle type='manifest' name='@SMF_NAME@'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <dependency name='filesystem_minimal' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+ <dependency name='loopback' grouping='require_any' restart_on='error' type='service'>
+ <service_fmri value='svc:/network/loopback' />
+ </dependency>
+ <dependency name='network' grouping='optional_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/network' />
+ </dependency>
+ <dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
+ <service_fmri value='file://localhost@PKG_SYSCONFDIR@/named.conf' />
+ </dependency>
+ <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
+ <!--
+ In order to run multiple named(1M) processes with their own
+ configuration file or properties each must have a unique
+ instance.
+ -->
+ <instance name='default' enabled='false'>
+ <exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.named@ %m %i' timeout_seconds='60'>
+ <method_context>
+ <!--
+ privileges: (see privileges(5) and /etc/security/priv_names)
+ file_dac_read, file_dac_search:
+ Necessary for reading the configuration file
+ even it is restricted by the file permission.
+ net_privaddr:
+ Bind to a privileged port number.
+ sys_resource:
+ Permit the setting of resource limits (eg. stack
+ size).
+ proc_chroot:
+ Permit use of chroot(2).
+ -->
+ <method_credential user='root' group='root' privileges='basic,!proc_session,!proc_info,!file_link_any,net_privaddr,file_dac_read,file_dac_search,sys_resource,proc_chroot' />
+ </method_context>
+ </exec_method>
+ <!--
+ SIGHUP causes named to reread its configuration file, but not any
+ of the properties below.
+ -->
+ <exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60'>
+ <method_context />
+ </exec_method>
+ <property_group name='general' type='framework'>
+ <!-- manage DNS server state -->
+ <propval name='action_authorization' type='astring' value='solaris.smf.manage.bind' />
+ <propval name='value_authorization' type='astring' value='solaris.smf.manage.bind' />
+ </property_group>
+ <!-- Default property settings for named(1M) instance. -->
+ <property_group name='options' type='application'>
+ <!--
+ server: specifies an alternative server command. If
+ not specified the default /usr/sbin/named is used.
+ -->
+ <propval name='server' type='astring' value='' />
+ <!--
+ configuration_file: specifies an alternative
+ configuration file to be used. The property is similar
+ to named(1M) command line option '-c'
+ -->
+ <propval name='configuration_file' type='astring' value='' />
+ <!--
+ ip_interfaces: specifies which IP transport BIND will
+ transmit on. Possible values are 'IPv4' or 'IPv6'. Any
+ other setting assumes 'all', the default.
+ Equivalent command line option '-4' or '-6'.
+ -->
+ <propval name='ip_interfaces' type='astring' value='all' />
+ <!--
+ listen_on_port: Specifies the default UDP and TCP port
+ which will be used to listen for DNS requests.
+ Equivalent command line option '-p <integer>'.
+ -->
+ <propval name='listen_on_port' type='integer' value='0' />
+ <!--
+ debug_level: Specifies the default debug level. The
+ default is 0; no debugging. The Higher the number the
+ more verbose debug information becomes.
+ Equivalent command line option '-d <integer>'.
+ -->
+ <propval name='debug_level' type='integer' value='0' />
+ <!--
+ threads: Specifies the number of cpu worker threads to
+ create. The default of 0 causes named to try and
+ determine the number of CPUs present and create one
+ thread per CPU.
+ Equivalent command line option '-n <integer>'.
+ -->
+ <propval name='threads' type='integer' value='0' />
+ <!--
+ chroot_dir: Change the root directory using chroot(2)
+ to directory after processing the command line
+ arguments, but before reading the configuration file.
+ Equivalent command line option '-t <pathname>'.
+ -->
+ <propval name='chroot_dir' type='astring' value='' />
+ </property_group>
+ </instance>
+ <stability value='Unstable' />
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>BIND DNS server</loctext>
+ </common_name>
+ <documentation>
+ <manpage title='named' section='1M' manpath='@PREFIX@/@PKGMANDIR@' />
+ </documentation>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/bind99/files/smf/named.sh b/net/bind99/files/smf/named.sh
new file mode 100644
index 00000000000..49a2da36913
--- /dev/null
+++ b/net/bind99/files/smf/named.sh
@@ -0,0 +1,117 @@
+#!@SMF_METHOD_SHELL@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "@(#)dns-server.sh 1.1 07/03/26 SMI"
+
+# smf_method(5) start/stop script required for server DNS
+
+. /lib/svc/share/smf_include.sh
+
+result=${SMF_EXIT_OK}
+
+# Read command line arguments
+method="$1" # %m
+instance="$2" # %i
+
+# Set defaults; SMF_FMRI should have been set, but just in case.
+if [ -z "$SMF_FMRI" ]; then
+ SMF_FMRI="svc:/@SMF_PREFIX@/@SMF_NAME@:${instance}"
+fi
+server="@PREFIX@/sbin/named"
+I=`/usr/bin/basename $0`
+
+case "$method" in
+'start')
+ cmdopts=""
+ properties="debug_level ip_interfaces listen_on_port
+ threads chroot_dir configuration_file server"
+
+ for prop in $properties
+ do
+ value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
+ if [ -z "${value}" -o "${value}" = '""' ]; then
+ continue;
+ fi
+
+ case $prop in
+ 'debug_level')
+ if [ ${value} -gt 0 ]; then
+ cmdopts="${cmdopts} -d ${value}"
+ fi
+ ;;
+ 'ip_interfaces')
+ case ${value} in
+ 'IPv4')
+ cmdopts="${cmdopts} -4";;
+ 'IPv6')
+ cmdopts="${cmdopts} -6";;
+ 'all')
+ : # Default is all, therefore ignore.
+ ;;
+ *)
+ echo "$I: Unrecognised value in service instance property" >&2
+ echo "$I: options/${prop} : ${value}" >&2
+ ;;
+ esac
+ ;;
+ 'listen_on_port')
+ if [ ${value} -gt 0 ]; then
+ cmdopts="${cmdopts} -p ${value}"
+ fi
+ ;;
+ 'threads')
+ if [ ${value} -gt 0 ]; then
+ cmdopts="${cmdopts} -n ${value}"
+ fi
+ ;;
+ 'chroot_dir')
+ cmdopts="${cmdopts} -t ${value}"
+ ;;
+ 'configuration_file')
+ cmdopts="${cmdopts} -c ${value}"
+ ;;
+ 'server')
+ set -- `echo ${value} | /usr/bin/sed -e 's/\\\\//g'`
+ server=$@
+ ;;
+ esac
+ done
+
+ if [ ${result} = ${SMF_EXIT_OK} ]; then
+ echo "$I: Executing: ${server} ${cmdopts}"
+ # Execute named(1M) with relevant command line options.
+ ${server} ${cmdopts}
+ result=$?
+ fi
+ ;;
+'stop')
+ smf_kill_contract ${contract} TERM 1
+ [ $? -ne 0 ] && exit 1
+ ;;
+*)
+ echo "Usage: $I [stop|start] <instance>" >&2
+ exit 1
+ ;;
+esac
+exit ${result}
diff --git a/net/dnsmasq/files/smf/manifest.xml b/net/dnsmasq/files/smf/manifest.xml
new file mode 100644
index 00000000000..c4993ebbd65
--- /dev/null
+++ b/net/dnsmasq/files/smf/manifest.xml
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='@SMF_NAME@'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <create_default_instance enabled='false' />
+ <single_instance />
+ <dependency name='multi-user' grouping='require_all' restart_on='refresh' type='service'>
+ <service_fmri value='svc:/milestone/multi-user' />
+ </dependency>
+ <dependency name='config' grouping='require_all' restart_on='restart' type='path'>
+ <service_fmri value='file://@PKG_SYSCONFDIR@/dnsmasq.conf' />
+ </dependency>
+ <dependent name='dnsmasq_multi-user-server' grouping='optional_all' restart_on='none'>
+ <service_fmri value='svc:/milestone/multi-user-server' />
+ </dependent>
+ <exec_method type='method' name='start' exec='@PREFIX@/sbin/dnsmasq -C %{config_file}' timeout_seconds='60'>
+ <method_context>
+ <method_credential user='root' group='root' />
+ </method_context>
+ </exec_method>
+ <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
+ <exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60' />
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/dnsmasq.conf" />
+ </property_group>
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>dnsmasq server</loctext>
+ </common_name>
+ <description>
+ <loctext xml:lang='C'>dnsmasq - A lightweight DHCP and caching DNS server.</loctext>
+ </description>
+ <documentation>
+ <manpage title='dnsmasq' section='8' manpath='@PREFIX@/@PKGMANDIR@' />
+ </documentation>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/haproxy/files/smf/manifest.xml b/net/haproxy/files/smf/manifest.xml
new file mode 100644
index 00000000000..5795a6665a4
--- /dev/null
+++ b/net/haproxy/files/smf/manifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/haproxy -f %{config_file} -D" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/haproxy.cfg" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">HAProxy</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/mDNSResponder/files/smf/manifest.xml b/net/mDNSResponder/files/smf/manifest.xml
new file mode 100644
index 00000000000..1beb9a45743
--- /dev/null
+++ b/net/mDNSResponder/files/smf/manifest.xml
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='@SMF_NAME@'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <create_default_instance enabled='false'/>
+ <single_instance/>
+ <dependency name='network' grouping='require_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/network:default'/>
+ </dependency>
+ <dependency name='filesystem' grouping='require_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/system/filesystem/local'/>
+ </dependency>
+ <exec_method name='start' type='method' exec='@PREFIX@/sbin/mdnsd' timeout_seconds='60'/>
+ <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+ <property_group name='application' type='application'/>
+ <property_group name='startd' type='framework'>
+ <propval name='duration' type='astring' value='contract'/>
+ <propval name='ignore_error' type='astring' value='core,signal'/>
+ </property_group>
+ <stability value='Evolving'/>
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>Apple ease-of-use IP networking initiative</loctext>
+ </common_name>
+ <documentation>
+ <manpage title='mdnsd' section='8M'/>
+ </documentation>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile
index 22a6252b80d..15bc9250124 100644
--- a/net/nagios-base/Makefile
+++ b/net/nagios-base/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2013/09/04 12:31:26 obache Exp $
+# $NetBSD: Makefile,v 1.50 2014/03/11 14:34:39 jperkin Exp $
#
DISTNAME= nagios-3.5.0
@@ -35,7 +35,10 @@ USE_TOOLS+= mail:run perl
CONFIGURE_ARGS+= --with-mail=${TOOLS_PLATFORM.mail:Q}
RCD_SCRIPTS+= nagios
+SMF_NAME= nagios
FILES_SUBST+= NAGIOS_USER=${NAGIOS_USER}
+FILES_SUBST+= NAGIOS_GROUP=${NAGIOS_GROUP}
+FILES_SUBST+= NAGIOSDIR=${NAGIOSDIR}
INSTALL_TARGET= install install-config
diff --git a/net/nagios-base/files/smf/manifest.xml b/net/nagios-base/files/smf/manifest.xml
new file mode 100644
index 00000000000..17f9c1b03f9
--- /dev/null
+++ b/net/nagios-base/files/smf/manifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <method_context working_directory="@NAGIOSDIR@">
+ <method_credential user="@NAGIOS_USER@" group="@NAGIOS_GROUP@" />
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/bin/nagios -d %{config_file}" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/nagios.cfg" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">Nagios monitoring</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/nagios-nrpe/Makefile b/net/nagios-nrpe/Makefile
index 2f7380afda3..1cfb4c023fc 100644
--- a/net/nagios-nrpe/Makefile
+++ b/net/nagios-nrpe/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2014/02/12 23:18:23 tron Exp $
+# $NetBSD: Makefile,v 1.22 2014/03/11 14:34:39 jperkin Exp $
#
DISTNAME= nrpe-2.12
@@ -34,6 +34,10 @@ CONFIGURE_ARGS+= --with-nagios-group=${NAGIOS_GROUP:Q}
CONF_FILES+= ${PREFIX}/share/examples/nagios/nrpe.cfg ${PKG_SYSCONFDIR}/nrpe.cfg
RCD_SCRIPTS+= nrpe
+SMF_NAME= nrpe
+FILES_SUBST+= NAGIOS_USER=${NAGIOS_USER}
+FILES_SUBST+= NAGIOS_GROUP=${NAGIOS_GROUP}
+FILES_SUBST+= NAGIOSDIR=${NAGIOSDIR}
INSTALLATION_DIRS= sbin libexec/nagios share/examples/nagios
diff --git a/net/nagios-nrpe/files/smf/manifest.xml b/net/nagios-nrpe/files/smf/manifest.xml
new file mode 100644
index 00000000000..5e941b5a6d9
--- /dev/null
+++ b/net/nagios-nrpe/files/smf/manifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <method_context working_directory="/tmp">
+ <method_credential user="@NAGIOS_USER@" group="@NAGIOS_GROUP@" />
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/nrpe -c %{config_file} -d" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/nrpe.cfg" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">Nagios Remote Plug-In Executor (NRPE)</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile
index f6a2445fc62..a2d3cc95166 100644
--- a/net/net-snmp/Makefile
+++ b/net/net-snmp/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.101 2014/02/12 23:18:23 tron Exp $
+# $NetBSD: Makefile,v 1.102 2014/03/11 14:34:39 jperkin Exp $
DISTNAME= net-snmp-5.7.2
PKGREVISION= 6
@@ -101,6 +101,7 @@ CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility
#
REQD_DIRS= ${PREFIX}/share/snmp
RCD_SCRIPTS= snmpd snmptrapd
+SMF_NAME= snmp
USE_TOOLS+= sh:run
REPLACE_INTERPRETER+= bash
diff --git a/net/net-snmp/files/smf/manifest.xml b/net/net-snmp/files/smf/manifest.xml
new file mode 100644
index 00000000000..3be62b4a03c
--- /dev/null
+++ b/net/net-snmp/files/smf/manifest.xml
@@ -0,0 +1,45 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='@SMF_NAME@'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <create_default_instance enabled='false'/>
+ <single_instance/>
+ <dependency name='milestone' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/milestone/sysconfig'/>
+ </dependency>
+ <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local'/>
+ </dependency>
+ <dependency name='name-services' grouping='optional_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/milestone/name-services'/>
+ </dependency>
+ <dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/system-log'/>
+ </dependency>
+ <dependency name='rstat' grouping='optional_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/network/rpc/rstat'/>
+ </dependency>
+ <dependency name='cryptosvc' grouping='require_all' restart_on='restart' type='service'>
+ <service_fmri value='svc:/system/cryptosvc'/>
+ </dependency>
+ <dependency name='network' grouping='require_all' restart_on='restart' type='service'>
+ <service_fmri value='svc:/milestone/network'/>
+ </dependency>
+ <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+ <service_fmri value='file://localhost/@PKG_SYSCONFDIR@/snmpd.conf'/>
+ </dependency>
+ <exec_method name='start' type='method' exec='@PREFIX@/sbin/snmpd -c %{config_file}' timeout_seconds='60'/>
+ <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/snmpd.conf" />
+ </property_group>
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>net-snmp SNMP daemon</loctext>
+ </common_name>
+ <documentation>
+ <manpage title='snmpd' section='1M' manpath='@PREFIX@/@PKGMANDIR@/'/>
+ </documentation>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/proftpd/files/smf/manifest.xml b/net/proftpd/files/smf/manifest.xml
new file mode 100644
index 00000000000..316cd4072eb
--- /dev/null
+++ b/net/proftpd/files/smf/manifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled='false'/>
+ <single_instance/>
+ <dependency name='network' grouping='require_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/network:default' />
+ </dependency>
+ <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local:default' />
+ </dependency>
+ <dependency name='autofs' grouping='optional_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/system/filesystem/autofs:default' />
+ </dependency>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/proftpd -c %{config_file}" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/proftpd.conf" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">ProFTPD FTP daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/rabbitmq/Makefile b/net/rabbitmq/Makefile
index dd5660453e2..415f064a27b 100644
--- a/net/rabbitmq/Makefile
+++ b/net/rabbitmq/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2014/03/10 11:18:41 fhajny Exp $
+# $NetBSD: Makefile,v 1.17 2014/03/11 14:34:39 jperkin Exp $
PKGNAME= rabbitmq-${RMQ_VERSION}
DISTNAME= rabbitmq-server-${RMQ_VERSION}
@@ -51,6 +51,10 @@ CONF_FILES+= share/examples/rabbitmq/rabbitmq-env.conf \
CONF_FILES+= share/examples/rabbitmq/rabbitmq.config.example \
${PKG_SYSCONFDIR}/rabbitmq.config
+FILES_SUBST+= RMQ_USER=${RMQ_USER}
+FILES_SUBST+= RMQ_GROUP=${RMQ_GROUP}
+FILES_SUBST+= RMQ_DIR=${RMQ_DIR}
+
INSTALLATION_DIRS+= share/examples/rabbitmq
SCRIPTS_DIR= ${WRKSRC}/scripts
diff --git a/net/rabbitmq/files/smf/manifest.xml b/net/rabbitmq/files/smf/manifest.xml
new file mode 100644
index 00000000000..cdd578c81c5
--- /dev/null
+++ b/net/rabbitmq/files/smf/manifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/@SMF_PREFIX@/epmd' />
+ </dependency>
+ <method_context>
+ <method_credential user="@RMQ_USER@" group="@RMQ_GROUP@" />
+ <method_environment>
+ <envvar name="HOME" value="@RMQ_DIR@" />
+ <envvar name="PATH" value="@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin" />
+ </method_environment>
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/rabbitmq-server" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="child" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">RabbitMQ Server</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/rsync/Makefile b/net/rsync/Makefile
index 9f5207bdc5a..2fc4a7c03d3 100644
--- a/net/rsync/Makefile
+++ b/net/rsync/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.91 2013/10/02 18:06:19 adam Exp $
+# $NetBSD: Makefile,v 1.92 2014/03/11 14:34:39 jperkin Exp $
DISTNAME= rsync-3.1.0
CATEGORIES= net
@@ -26,6 +26,7 @@ PKG_SYSCONFSUBDIR= rsync
RCD_SCRIPTS= rsyncd
RCD_SCRIPT_SRC.rsyncd= files/rsyncd.sh
+SMF_NAME= rsyncd
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Fixing hardcoded paths.
diff --git a/net/rsync/files/smf/manifest.xml b/net/rsync/files/smf/manifest.xml
new file mode 100644
index 00000000000..2329b526e1d
--- /dev/null
+++ b/net/rsync/files/smf/manifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <exec_method type="method" name="start" exec="@PREFIX@/bin/rsync --daemon --config %{config_file}" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/rsyncd.conf" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">rsyncd daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/spread/files/smf/manifest.xml b/net/spread/files/smf/manifest.xml
new file mode 100644
index 00000000000..024cccb4e4d
--- /dev/null
+++ b/net/spread/files/smf/manifest.xml
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='@SMF_NAME@'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='0'>
+ <create_default_instance enabled='false' />
+ <single_instance />
+ <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+ <dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/network/service' />
+ </dependency>
+ <dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
+ <service_fmri value='svc:/milestone/name-services' />
+ </dependency>
+ <method_context working_directory='@SPREAD_DIR@'>
+ <method_credential group='@SPREAD_USER@' user='@SPREAD_GROUP@' />
+ </method_context>
+ <exec_method name='start' type='method' exec='@PREFIX@/sbin/spread -c @PKG_SYSCONFDIR@/spread.conf' timeout_seconds='300' />
+ <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
+ <property_group name='startd' type='framework'>
+ <propval name='duration' type='astring' value='child' />
+ <propval name='ignore_error' type='astring' value='core,signal' />
+ </property_group>
+ <stability value='Stable' />
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>Spread Daemon</loctext>
+ </common_name>
+ <documentation>
+ <manpage title='spread' section='1' manpath='@PREFIX@/@PKGMANDIR@' />
+ </documentation>
+ </template>
+ </service>
+</service_bundle>