FreeBSD Bugzilla – Attachment 162293 Details for
Bug 203931
[PATCH] dns/knot2 enable multiple instances in rc.d script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff of dns/knot2
knot2.diff (text/plain), 4.35 KB, created by
Chad Jacob Milios
on 2015-10-21 15:10:50 UTC
(
hide
)
Description:
svn diff of dns/knot2
Filename:
MIME Type:
Creator:
Chad Jacob Milios
Created:
2015-10-21 15:10:50 UTC
Size:
4.35 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 399603) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= knot > DISTVERSION= 2.0.1 >+PORTREVISION= 1 > CATEGORIES= dns ipv6 > MASTER_SITES= https://secure.nic.cz/files/knot-dns/ \ > http://dns-lab.com/downloads/knot-dns/ >@@ -22,7 +23,7 @@ > > CONFLICTS= knot-1.* knot1-[0-6].* > >-USES= alias libtool pkgconfig tar:xz >+USES= compiler alias libtool pkgconfig tar:xz > USE_LDCONFIG= yes > > GNU_CONFIGURE= yes >@@ -57,6 +58,12 @@ > IDN_CONFIGURE_WITH= libidn > IDN_LIB_DEPENDS= libidn.so:${PORTSDIR}/dns/libidn > >+.include <bsd.port.pre.mk> >+ >+.if ${PORT_OPTIONS:MDNSTAP} && ${COMPILER_TYPE} == gcc >+USE_GCC= 4.8+ >+.endif >+ > post-patch: > @${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|' \ > ${WRKSRC}/src/Makefile.in >Index: files/knot.in >=================================================================== >--- files/knot.in (revision 399603) >+++ files/knot.in (working copy) >@@ -10,45 +10,93 @@ > # > # knot_enable="YES": Set to NO by default. > # Set it to YES to enable knot. >-# knot_config="": Set to /usr/local/etc/knot/knot.conf >+# knot_config="": Set to %%PREFIX%%/etc/knot/knot.conf > # by default. >+# >+# ----------------------------------------------------------------------------- >+# >+# This script supports running multiple instances of knot. >+# To run additional instances link this script to something like >+# % ln -s knot knot_foo >+# and define additional knot_foo_* variables in one of >+# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/knot_foo >+# >+# Below NAME should be substituted with the name of this script. By default >+# it is knot, so read as knot_enable. If you linked the script to >+# knot_foo, then read as knot_foo_enable etc. >+# >+# The following variables are supported (defaults are shown). >+# You can place them in any of >+# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME >+# >+# NAME_enable="NO" # set to YES to enable knot >+# >+# # optional: >+# NAME_config="%%PREFIX%%/etc/knot/NAME.conf" # (-c)onfig file >+# NAME_diruser="%%USERS%%" # /var/db/NAME and /var/run/NAME are created if they >+# NAME_dirgroup="%%GROUPS%%" # don't exist. These don't control the user/group knot >+# # runs as, the config file has a setting for that. >+# >+# You also need to set the rundir directive in the server section of the >+# config file to /var/run/NAME (if using a NAME other than the default) >+# and you will want the storage directive(s) declared in the zone section >+# to point to /var/db/NAME overriding the default of /var/db/knot. >+# >+# For further documentation, please see knot.conf(5). > > . /etc/rc.subr > >-name=knot >-rcvar=knot_enable >+case "$0" in >+/etc/rc*) >+ # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), >+ # so get the name of the script from $_file >+ name="$_file" >+ ;; >+*) >+ name="$0" >+ ;; >+esac > >+name="${name##*/}" >+rcvar=${name}_enable >+ > load_rc_config ${name} > >-: ${knot_enable:=NO} >-: ${knot_config="%%PREFIX%%/etc/knot/knot.conf"} >+eval ": \${${name}_enable:=\"NO\"}" >+eval ": \${${name}_diruser:=\"%%USERS%%\"}" >+eval ": \${${name}_dirgroup:=\"%%GROUPS%%\"}" >+eval ": \${${name}_config:=\"%%PREFIX%%/etc/knot/${name}.conf\"}" > >+configfile="$(eval echo \${${name}_config})" >+diruser="$(eval echo \${${name}_diruser})" >+dirgroup="$(eval echo \${${name}_dirgroup})" >+ > command=%%PREFIX%%/sbin/knotd >-command_args="-c ${knot_config} -d" >+command_args="-c ${configfile} -d" > control=%%PREFIX%%/sbin/knotc >-pidfile=/var/run/knot/knot.pid >+pidfile=/var/run/${name}/knot.pid > >-required_files=${knot_config} >+required_files=${configfile} > > extra_commands=reload >-reload_cmd="${name}_reload" >-start_precmd="${name}_prestart" >+reload_cmd="knot_reload" >+start_precmd="knot_prestart" > > knot_prestart() > { >- if [ ! -d /var/run/knot ]; then >- install -d -o %%USERS%% -g %%GROUPS%% /var/run/knot >+ if [ ! -d /var/run/${name} ]; then >+ install -d -o ${diruser} -g ${dirgroup} /var/run/${name} > fi >- if [ ! -d /var/db/knot ]; then >- install -d -o %%USERS%% -g %%GROUPS%% /var/db/knot >+ if [ ! -d /var/db/${name} ]; then >+ install -d -o ${diruser} -g ${dirgroup} /var/db/${name} > fi >- ${control} -c ${knot_config} checkconf >+ ${control} -c ${configfile} checkconf > } > > knot_reload() > { > echo "Reloading ${name}." >- ${control} -c ${knot_config} reload >+ ${control} -c ${configfile} reload > } > > run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203931
:
162293
|
162371
|
164100