View | Details | Raw Unified | Return to bug 193255 | Differences between
and this patch

Collapse All | Expand All

(-)etc/defaults/rc.conf (+7 lines)
Lines 267-272 Link Here
267
hastd_flags=""			# Optional flags to hastd.
267
hastd_flags=""			# Optional flags to hastd.
268
ctld_enable="NO"		# CAM Target Layer / iSCSI target daemon.
268
ctld_enable="NO"		# CAM Target Layer / iSCSI target daemon.
269
local_unbound_enable="NO"	# local caching resolver
269
local_unbound_enable="NO"	# local caching resolver
270
local_unbound_program="/usr/sbin/unbound"
271
local_unbound_workdir=/var/unbound
272
local_unbound_config="${local_unbound_workdir}/unbound.conf"
273
local_unbound_flags="-c${local_unbound_config}"
274
local_unbound_forwardconf="${local_unbound_workdir}/forward.conf}"
275
local_unbound_anchor="${local_unbound_workdir}/root.key"
276
local_unbound_forwarders=""
270
277
271
#
278
#
272
# kerberos. Do not run the admin daemons on slave servers
279
# kerberos. Do not run the admin daemons on slave servers
(-)etc/rc.d/local_unbound (-14 / +6 lines)
Lines 13-19 Link Here
13
desc="local caching forwarding resolver"
13
desc="local caching forwarding resolver"
14
rcvar="local_unbound_enable"
14
rcvar="local_unbound_enable"
15
15
16
command="/usr/sbin/unbound"
17
extra_commands="anchor configtest reload setup"
16
extra_commands="anchor configtest reload setup"
18
start_precmd="local_unbound_prestart"
17
start_precmd="local_unbound_prestart"
19
reload_precmd="local_unbound_configtest"
18
reload_precmd="local_unbound_configtest"
Lines 22-39 Link Here
22
setup_cmd="local_unbound_setup"
21
setup_cmd="local_unbound_setup"
23
pidfile="/var/run/${name}.pid"
22
pidfile="/var/run/${name}.pid"
24
23
25
: ${local_unbound_workdir:=/var/unbound}
26
: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf}
27
: ${local_unbound_flags:=-c${local_unbound_config}}
28
: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf}
29
: ${local_unbound_anchor:=${local_unbound_workdir}/root.key}
30
: ${local_unbound_forwarders:=}
31
32
load_rc_config $name
33
34
do_as_unbound()
24
do_as_unbound()
35
{
25
{
36
	echo "$@" | su -m unbound
26
	echo "$@" | /usr/bin/su -m unbound
37
}
27
}
38
28
39
#
29
#
Lines 41-47 Link Here
41
#
31
#
42
local_unbound_anchor()
32
local_unbound_anchor()
43
{
33
{
44
	do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor}
34
	do_as_unbound ${unbound_program%/*}/unbound-anchor \
35
	    -a ${local_unbound_anchor}
45
	# we can't trust the exit code - check if the file exists
36
	# we can't trust the exit code - check if the file exists
46
	[ -f ${local_unbound_anchor} ]
37
	[ -f ${local_unbound_anchor} ]
47
}
38
}
Lines 51-57 Link Here
51
#
42
#
52
local_unbound_configtest()
43
local_unbound_configtest()
53
{
44
{
54
	do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config}
45
	do_as_unbound ${unbound_program%/*}/unbound-checkconf \
46
	    ${local_unbound_config}
55
}
47
}
56
48
57
#
49
#
Lines 61-67 Link Here
61
local_unbound_setup()
53
local_unbound_setup()
62
{
54
{
63
	echo "Performing initial setup."
55
	echo "Performing initial setup."
64
	/usr/sbin/local-unbound-setup -n \
56
	${unbound_program}/local-unbound-setup -n \
65
	    -u unbound \
57
	    -u unbound \
66
	    -w ${local_unbound_workdir} \
58
	    -w ${local_unbound_workdir} \
67
	    -c ${local_unbound_config} \
59
	    -c ${local_unbound_config} \

Return to bug 193255