ports/182792: dns/knot: knotd startup script no longer works
Leo Vandewoestijne
freebsd at dns-lab.com
Mon Oct 14 14:10:02 UTC 2013
The following reply was made to PR ports/182792; it has been noted by GNATS.
From: Leo Vandewoestijne <freebsd at dns-lab.com>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: ports/182792: dns/knot: knotd startup script no longer works
Date: Mon, 14 Oct 2013 13:51:28 +0000
--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, 08 Oct 2013, Edwin Groothuis wrote:
> Maintainer of dns/knot,
>
> Please note that PR ports/182792 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/182792
>
> --
> Edwin Groothuis via the GNATS Auto Assign Tool
> edwin at FreeBSD.org
I made enclosed patch to simplify the setup, and solve the startup problem.
--
Met vriendelijke groet,
With kind regards,
Leo Vandewoestijne.
AS50381 / DNS-Lab
--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="knot.diff.txt"
diff -ruN knot.old/Makefile knot/Makefile
--- knot.old/Makefile 2013-10-01 16:02:12.000000000 +0000
+++ knot/Makefile 2013-10-14 13:19:17.000000000 +0000
@@ -2,6 +2,7 @@
# $FreeBSD: dns/knot/Makefile 328959 2013-10-01 16:02:12Z wg $
PORTNAME= knot
+PORTREVISION= 1
DISTVERSION= 1.3.2
CATEGORIES= dns ipv6
MASTER_SITES= https://secure.nic.cz/files/knot-dns/ \
@@ -37,5 +38,9 @@
${INSTALL_DATA} ${WRKSRC}/samples/knot.sample.conf ${STAGEDIR}${ETCDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
+ @${MKDIR} -p ${PREFIX}/var/lib/knot
+ @${MKDIR} -p ${PREFIX}/var/run/knot
+ @${CHOWN} 53:53 ${PREFIX}/var/lib/knot
+ @${CHOWN} 53:53 ${PREFIX}/var/run/knot
.include <bsd.port.mk>
diff -ruN knot.old/files/knotd.in knot/files/knotd.in
--- knot.old/files/knotd.in 2013-06-13 16:15:29.000000000 +0000
+++ knot/files/knotd.in 2013-10-14 11:58:15.000000000 +0000
@@ -20,6 +20,7 @@
extra_commands="reload"
reload_cmd="${name}_reload"
+start_cmd="${name}_start"
status_cmd="${name}_status"
stop_cmd="${name}_stop"
@@ -32,9 +33,12 @@
procname=%%PREFIX%%/sbin/${name}d
pidfile=/var/run/${name}.pid
-command_args="-c ${knot_config} -w start"
required_files=${knot_config}
+knot_start() {
+ echo "Starting ${name}."
+ %%PREFIX%%/sbin/${name}d -c ${knot_config} -d
+ }
knot_reload() {
echo "Reloading ${name}."
${command} -c ${knot_config} reload
diff -ruN knot.old/files/pkg-message.in knot/files/pkg-message.in
--- knot.old/files/pkg-message.in 2013-06-13 16:15:29.000000000 +0000
+++ knot/files/pkg-message.in 2013-10-14 12:32:06.000000000 +0000
@@ -1,30 +1,24 @@
####################################################################
#
-# To start using Knot DNS, you should complete the following tasks:
-#
-# ----- configure --------------------------------------------------
+# To get Knot DNS started:
#
cp %%ETCDIR%%/knot.sample.conf %%ETCDIR%%/knot.conf
+ # in knot.conf set user to "bind.bind":
$EDITOR %%ETCDIR%%/knot.conf
-#
-# ----- prepare ----------------------------------------------------
-#
-# required:
echo knot_enable=\"YES\" >> /etc/rc.conf
-# for customization if desired:
# echo knot_config=\"%%PREFIX%%/etc/knot/knot.conf\" >> /etc/rc.conf
-#
-# ----- startup ----------------------------------------------------
-#
%%PREFIX%%/etc/rc.d/knotd start
#
####################################################################
+ Mind:
- When upgrading from version of before 1.3.0-RC1:
- mind the default config file location has changed.
+ when upgrading from version of before 1.3.0-RC1:
+ the default config file location has changed.
+ when upgrading from version of before 1.3.1-RC1:
+ the startup script has changed due to parameter changes.
====================================================================
--qDbXVdCdHGoSgWSk--
More information about the freebsd-ports-bugs
mailing list