Bug 208 - More flexibility in rc.d script for FreeBSD / NanoBSD
More flexibility in rc.d script for FreeBSD / NanoBSD
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.0.0
Other FreeBSD
: P2 normal
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-18 13:23 CEST by Pierre DAVID
Modified: 2008-08-18 13:39 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre DAVID 2008-08-18 13:23:52 CEST
In order to use unbound on FreeBSD on my Soekris, I'm using the NanoBSD
script, which creates a read-only /usr hierarchy. So, I'm requesting
more flexibility in rc.conf options, in order to locate pid file and
configuration file in /etc/unbound/.

The following patch enables unbound_pidfile and unbound_flags variables
in rc.conf.

--- contrib/rc_d_unbound.org      2008-08-18 13:20:01.567449473 +0200
+++ contrib/rc_d_unbound  2008-08-18 13:15:03.724401264 +0200
@@ -15,9 +15,11 @@
 name="unbound"
 rcvar=`set_rcvar`

+load_rc_config $name
+
 command="/usr/local/sbin/unbound"
-pidfile="/usr/local/etc/unbound/unbound.pid"
+pidfile=${unbound_pidfile:-"/usr/local/etc/unbound/unbound.pid"}
+command_args=${unbound_flags:-"-c /usr/local/etc/unbound/unbound.conf"}
 extra_commands="reload"

-load_rc_config $name
 run_rc_command "$1"
Comment 1 Wouter Wijngaards 2008-08-18 13:39:02 CEST
Thank you for the patch. Applied to svn trunk contrib directory.
   Wouter