Dnsmasq starts without etc/dnsmasq.conf, and there is no proper place to set ${dnsmasq_conf} on booting. Fix: The order of loading rc.conf and setting values are reversed. A patch file is attached. Thank you. Patch attached with submission follows: How-To-Repeat: Install dns/dnsmasq, remove or rename /usr/local/etc/dnsmasq.conf, and start it.
Maintainer of dns/dnsmasq, Please note that PR ports/137506 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137506 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
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 ---
State Changed From-To: feedback->closed Committed. Thanks!