Date: Fri, 7 Aug 2009 04:50:01 GMT From: Fumiyuki Shimizu <fumifumi@abacustech.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/137506: dns/dnsmasq starts without configuration files. Message-ID: <200908070450.n774o15f042055@www.freebsd.org> Resent-Message-ID: <200908070500.n77509et019816@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908070450.n774o15f042055>