diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-08-13 21:05:46 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-08-13 21:05:46 +0000 |
commit | 447234fea1312b8a4ff78bbc2142ed6658df3b55 (patch) | |
tree | 5b57136cc48bd02dbb8a86935194399a441e17f5 /dns/dnsmasq | |
parent | py-repoze.what-pylons is an extras plugin for repoze.what (diff) |
* 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.
PR: 137506
Submitted by: Matthias Andree <matthias.andree@gmx.de> (maintainer)
Notes
Notes:
svn path=/head/; revision=239481
Diffstat (limited to 'dns/dnsmasq')
-rw-r--r-- | dns/dnsmasq/Makefile | 4 | ||||
-rw-r--r-- | dns/dnsmasq/files/dnsmasq.sh.in | 29 |
2 files changed, 22 insertions, 11 deletions
diff --git a/dns/dnsmasq/Makefile b/dns/dnsmasq/Makefile index 51b3a98624a4..f4e29d9a3b59 100644 --- a/dns/dnsmasq/Makefile +++ b/dns/dnsmasq/Makefile @@ -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 --git a/dns/dnsmasq/files/dnsmasq.sh.in b/dns/dnsmasq/files/dnsmasq.sh.in index bc45ded1de13..f073c597bc7d 100644 --- a/dns/dnsmasq/files/dnsmasq.sh.in +++ b/dns/dnsmasq/files/dnsmasq.sh.in @@ -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" - |