From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 7 05:00:09 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA551065698 for ; Fri, 7 Aug 2009 05:00:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4C46F8FC1D for ; Fri, 7 Aug 2009 05:00:09 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n77509Su019817 for ; Fri, 7 Aug 2009 05:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n77509et019816; Fri, 7 Aug 2009 05:00:09 GMT (envelope-from gnats) Resent-Date: Fri, 7 Aug 2009 05:00:09 GMT Resent-Message-Id: <200908070500.n77509et019816@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Fumiyuki Shimizu Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9753E106564A for ; Fri, 7 Aug 2009 04:50:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 856508FC16 for ; Fri, 7 Aug 2009 04:50:01 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n774o18G042056 for ; Fri, 7 Aug 2009 04:50:01 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n774o15f042055; Fri, 7 Aug 2009 04:50:01 GMT (envelope-from nobody) Message-Id: <200908070450.n774o15f042055@www.freebsd.org> Date: Fri, 7 Aug 2009 04:50:01 GMT From: Fumiyuki Shimizu To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/137506: dns/dnsmasq starts without configuration files. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 05:00:12 -0000 >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: