diff options
author | joerg <joerg@pkgsrc.org> | 2015-10-21 21:30:14 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-10-21 21:30:14 +0000 |
commit | d023418b01ff2952e6c6a00c37a45122b2028b5b (patch) | |
tree | f6e43c366987a4f2d8d74220080789714b1315ca /net | |
parent | cafc5d929c34cf57ef05aa9a9a6fdb3ac392121b (diff) | |
download | pkgsrc-d023418b01ff2952e6c6a00c37a45122b2028b5b.tar.gz |
Add SMF support. Bump revision.
Diffstat (limited to 'net')
-rw-r--r-- | net/unbound/Makefile | 5 | ||||
-rw-r--r-- | net/unbound/files/smf/manifest.xml | 36 | ||||
-rw-r--r-- | net/unbound/files/smf/unbound.sh | 11 |
3 files changed, 51 insertions, 1 deletions
diff --git a/net/unbound/Makefile b/net/unbound/Makefile index 73460f9f7c6..22c1817b5dc 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.38 2015/10/21 21:30:14 joerg 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..1573ca6b910 --- /dev/null +++ b/net/unbound/files/smf/manifest.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- $NetBSD: manifest.xml,v 1.1 2015/10/21 21:30:14 joerg 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..cd1e33e26e6 --- /dev/null +++ b/net/unbound/files/smf/unbound.sh @@ -0,0 +1,11 @@ +#!/sbin/sh +# $NetBSD: unbound.sh,v 1.1 2015/10/21 21:30:14 joerg 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" |