Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2010 18:46:33 GMT
From:      Keith Gaughan <k@stereochro.me>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/142793: dns/unbound: no default for unbound_enable and PID file in problematic location.
Message-ID:  <201001131846.o0DIkXmE087629@www.freebsd.org>
Resent-Message-ID: <201001131850.o0DIo2UD017368@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         142793
>Category:       ports
>Synopsis:       dns/unbound: no default for unbound_enable and PID file in problematic location.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 13 18:50:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Keith Gaughan
>Release:        8.0
>Organization:
>Environment:
FreeBSD talisra 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
If unbound is installed, but unbound_enabled is not defined in /etc/rc.conf, the system will complain about this. Also, it's putting it's PID file in %%PREFIX%%/etc/unbound/unbound.pid, which is problematic if you want %%PREFIX%% to be read-only or if it's shared as an NFS mount amongst a number of machines.

This patch modifies unbound's rc file to provide a default for unbound_enabled and modifies the location of its PID file to /var/run/unbound.pid.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- unbound.in	2008-05-07 12:33:37.000000000 +0100
+++ unbound.in.patched	2010-01-10 18:13:31.000000000 +0000
@@ -2,7 +2,7 @@
 #
 # unbound freebsd startup rc.d script, modified from the named script.
 # uses the default unbound installation path and pidfile location.
-# copy this to /etc/rc.d/unbound
+# copy this to %%PREFIX%%/etc/rc.d/unbound
 # and put unbound_enable="YES" into rc.conf
 #
 
@@ -16,8 +16,10 @@
 rcvar=`set_rcvar`
 
 command="%%PREFIX%%/sbin/unbound"
-pidfile="%%PREFIX%%/etc/unbound/unbound.pid"
+pidfile="/var/run/${name}.pid"
 extra_commands="reload"
 
 load_rc_config $name
+: ${unbound_enable:-"NO"}
+
 run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001131846.o0DIkXmE087629>