Date: Fri, 7 Aug 2009 09:10:07 GMT From: Matthias Andree <matthias.andree@gmx.de> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/137506: dns/dnsmasq starts without configuration files. Message-ID: <200908070910.n779A7NO033683@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/137506; it has been noted by GNATS. From: Matthias Andree <matthias.andree@gmx.de> 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 ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908070910.n779A7NO033683>