ports/137506: dns/dnsmasq starts without configuration files.
Fumiyuki Shimizu
fumifumi at abacustech.jp
Fri Aug 7 05:00:12 UTC 2009
>Number: 137506
>Category: ports
>Synopsis: dns/dnsmasq starts without configuration files.
>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: Fri Aug 07 05:00:08 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Fumiyuki Shimizu
>Release: 7.1-RELEASE
>Organization:
>Environment:
FreeBSD 7.1-RELEASE-p6 FreeBSD 7.1-RELEASE-p6 #0: Tue Jun 9 16:26:47 UTC 2009 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Dnsmasq starts without etc/dnsmasq.conf, and there is no proper place
to set ${dnsmasq_conf} on booting.
>How-To-Repeat:
Install dns/dnsmasq, remove or rename /usr/local/etc/dnsmasq.conf, and start it.
>Fix:
The order of loading rc.conf and setting values are reversed.
A patch file is attached.
Thank you.
Patch attached with submission follows:
--- dnsmasq.sh.in.orig 2009-07-16 07:57:30.000000000 +0900
+++ dnsmasq.sh.in 2009-08-07 13:31:32.000000000 +0900
@@ -10,20 +10,21 @@
# dnsmasq_enable="YES"
#
-# override these variables in /etc/rc.conf
-dnsmasq_enable=${dnsmasq_enable:-"NO"}
-
. %%RC_SUBR%%
name=dnsmasq
-rcvar=$(set_rcvar)
+rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
-required_files=${dnsmasq_conf}
extra_commands=reload
load_rc_config ${name}
+
+: ${dnsmasq_enable="NO"}
+: ${dnsmasq_conf="%%PREFIX%%/etc/${name}.conf"}
+required_files=${dnsmasq_conf}
+
run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list