From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 7 09:10:07 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 D6BC8106564A for ; Fri, 7 Aug 2009 09:10:07 +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 C546A8FC1C for ; Fri, 7 Aug 2009 09:10:07 +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 n779A7Xo033686 for ; Fri, 7 Aug 2009 09:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n779A7NO033683; Fri, 7 Aug 2009 09:10:07 GMT (envelope-from gnats) Date: Fri, 7 Aug 2009 09:10:07 GMT Message-Id: <200908070910.n779A7NO033683@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Matthias Andree Cc: Subject: Re: ports/137506: dns/dnsmasq starts without configuration files. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Andree List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 09:10:08 -0000 The following reply was made to PR ports/137506; it has been noted by GNATS. From: Matthias Andree To: bug-followup@FreeBSD.org,fumifumi@abacustech.jp Cc: edwin@freebsd.org Subject: Re: ports/137506: dns/dnsmasq starts without configuration files. Date: Fri, 7 Aug 2009 11:07:22 +0200 (CEST) Please use the patch below instead: ------BEGIN CHANGELOG * Fix rcfile bugs (and bump PORTREVISION): - load configuration earlier so that we don't run without config file, analyzed, reported and patch suggested by Fumiyuki Shimizu - mention /etc/rc.conf.local (as suggested in the Porter's handbook) - mention dnsmasq_flags for additional command line arguments - pass pidfile and dnsmasq_conf as arguments to dnsmasq (previously, overriding dnsmasq_conf had no effect). * Fix COMMENT to mention TFTP server; shorten it so it fully fits on the pkg_info list. ------END CHANGELOG Add further PR and submitter info as usual. --- dnsmasq-2.49_2.patch begins here --- diff -ruN --exclude=CVS /usr/ports/dns/dnsmasq/Makefile /usr/home/ma/ports/dns/dnsmasq/Makefile --- /usr/ports/dns/dnsmasq/Makefile 2009-07-16 00:57:30.000000000 +0200 +++ /usr/home/ma/ports/dns/dnsmasq/Makefile 2009-08-07 10:56:37.000000000 +0200 @@ -7,14 +7,14 @@ PORTNAME= dnsmasq PORTVERSION= 2.49 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= dns ipv6 MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/ \ ${MASTER_SITE_GENTOO} MASTER_SITE_SUBDIR= distfiles MAINTAINER= matthias.andree@gmx.de -COMMENT= Lightweight, easy to configure DNS forwarder and DHCP server +COMMENT= Lightweight DNS forwarder, DHCP and TFTP server MAN8= dnsmasq.8 diff -ruN --exclude=CVS /usr/ports/dns/dnsmasq/files/dnsmasq.sh.in /usr/home/ma/ports/dns/dnsmasq/files/dnsmasq.sh.in --- /usr/ports/dns/dnsmasq/files/dnsmasq.sh.in 2009-07-16 00:57:30.000000000 +0200 +++ /usr/home/ma/ports/dns/dnsmasq/files/dnsmasq.sh.in 2009-08-07 10:48:41.000000000 +0200 @@ -5,25 +5,36 @@ # BEFORE: DAEMON # KEYWORD: shutdown # -# Add the following line to /etc/rc.conf to enable dnsmasq: +# Add the following line to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: # -# dnsmasq_enable="YES" +# dnsmasq_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable dnsmasq at boot. +# +# Further settings you can change in /etc/rc.conf if desired: +# +# dnsmasq_conf (path): Set to %%PREFIX%%/etc/dnsmasq.conf by default. +# Set it to another configuration file if you want. +# +# dnsmasq_flags (string): Empty by default. Set it to additional command +# line arguments if desired. # - -# override these variables in /etc/rc.conf -dnsmasq_enable=${dnsmasq_enable:-"NO"} . %%RC_SUBR%% name=dnsmasq rcvar=$(set_rcvar) -command=%%PREFIX%%/sbin/${name} +command="%%PREFIX%%/sbin/${name}" +extra_commands=reload pidfile=/var/run/${name}.pid + +load_rc_config ${name} + +: ${dnsmasq_enable="NO"} +: ${dnsmasq_conf="%%PREFIX%%/etc/${name}.conf"} required_files=${dnsmasq_conf} -extra_commands=reload +command_args="-x $pidfile -C $dnsmasq_conf" -load_rc_config ${name} run_rc_command "$1" - --- dnsmasq-2.49_2.patch ends here ---