summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2015-10-26 20:12:11 +0000
committerbsiegert <bsiegert@pkgsrc.org>2015-10-26 20:12:11 +0000
commitefee08115b0ec3a490c36538080c66a55174d4d0 (patch)
tree0b35f0fef8d3d438a019b1a0ccefb4688800bdc0
parent5fc92e9a95566d8cc49137bbbb373dc47849a005 (diff)
downloadpkgsrc-efee08115b0ec3a490c36538080c66a55174d4d0.tar.gz
Pullup ticket #4844 - requested by joerg
net/unbound: SMF support Revisions pulled up: - net/unbound/Makefile 1.38 - net/unbound/files/smf/manifest.xml 1.1 - net/unbound/files/smf/unbound.sh 1.1 --- Module Name: pkgsrc Committed By: joerg Date: Wed Oct 21 21:30:14 UTC 2015 Modified Files: pkgsrc/net/unbound: Makefile Added Files: pkgsrc/net/unbound/files/smf: manifest.xml unbound.sh Log Message: Add SMF support. Bump revision.
-rw-r--r--net/unbound/Makefile5
-rw-r--r--net/unbound/files/smf/manifest.xml36
-rw-r--r--net/unbound/files/smf/unbound.sh11
3 files changed, 51 insertions, 1 deletions
diff --git a/net/unbound/Makefile b/net/unbound/Makefile
index 73460f9f7c6..ab7cfa59525 100644
--- a/net/unbound/Makefile
+++ b/net/unbound/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.37 2015/07/15 18:09:05 pettai Exp $
+# $NetBSD: Makefile,v 1.37.2.1 2015/10/26 20:12:11 bsiegert Exp $
DISTNAME= unbound-1.5.4
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.unbound.net/downloads/
@@ -80,6 +81,8 @@ CONF_FILES+= share/examples/unbound/unbound.conf \
${PKG_SYSCONFDIR}/unbound.conf
RCD_SCRIPTS= unbound
+SMF_METHODS= unbound
+SMF_NAME= unbound
UNBOUND_USER?= unbound
UNBOUND_GROUP?= unbound
diff --git a/net/unbound/files/smf/manifest.xml b/net/unbound/files/smf/manifest.xml
new file mode 100644
index 00000000000..c5853536d68
--- /dev/null
+++ b/net/unbound/files/smf/manifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- $NetBSD: manifest.xml,v 1.1.2.2 2015/10/26 20:12:12 bsiegert Exp $ -->
+<!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>
+ <method_context>
+ <method_environment>
+ <envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
+ </method_environment>
+ </method_context>
+ <exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.unbound@ %{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@/unbound.conf" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">unbound DNS cache</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/net/unbound/files/smf/unbound.sh b/net/unbound/files/smf/unbound.sh
new file mode 100644
index 00000000000..b6ae25b956a
--- /dev/null
+++ b/net/unbound/files/smf/unbound.sh
@@ -0,0 +1,11 @@
+#!/sbin/sh
+# $NetBSD: unbound.sh,v 1.1.2.2 2015/10/26 20:12:12 bsiegert Exp $
+. /lib/svc/share/smf_include.sh
+
+if [ ! -d @VARBASE@/run/unbound ]; then
+ @MKDIR@ @VARBASE@/run/unbound
+ @CHMOD@ 0750 @VARBASE@/run/unbound
+ @CHOWN@ @UNBOUND_USER@:@UNBOUND_GROUP@ @VARBASE@/run/unbound
+fi
+
+@PREFIX@/sbin/unbound -c "$1"