FreeBSD Bugzilla – Attachment 225993 Details for
Bug 256221
dns/knot-resolver: the kresd init script won't stop the service
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
knot-resolver fixes and cleanup
file_256221.txt (text/plain), 3.51 KB, created by
Leo Vandewoestijne
on 2021-06-22 13:34:03 UTC
(
hide
)
Description:
knot-resolver fixes and cleanup
Filename:
MIME Type:
Creator:
Leo Vandewoestijne
Created:
2021-06-22 13:34:03 UTC
Size:
3.51 KB
patch
obsolete
>diff -ruN /usr/ports/dns/knot-resolver/Makefile dns/knot-resolver/Makefile >--- /usr/ports/dns/knot-resolver/Makefile 2021-04-14 00:32:57.000000000 +0000 >+++ dns/knot-resolver/Makefile 2021-06-22 12:54:22.900556000 +0000 >@@ -1,4 +1,5 @@ > # Created by: Leo Vandewoestijne <freebsd@dns.company> >+# $FreeBSD: head/dns/knot-resolver/Makefile 568596 2021-03-16 18:11:26Z nc $ > > PORTNAME= knot-resolver > DISTVERSION= 5.3.0 >@@ -58,14 +59,13 @@ > --libdir=${PREFIX}/lib \ > --pkg-config-path=${PREFIX}/libdata/pkgconfig \ > --prefix=${LOCALBASE} \ >- -Dclient=enabled \ > -Duser=${USERS} \ > -Dgroup=${GROUPS} \ > -Dinstall_kresd_conf=enabled \ >+ -Dclient=enabled \ >+ -Dutils=enabled \ > -Dkeyfile_default=${ETCDIR}/root.keys \ >- -Droot_hints=${ETCDIR}/root.hints \ >- -Duser=${USERS} \ >- -Dutils=enabled >+ -Droot_hints=${ETCDIR}/root.hints > > LDFLAGS+= -L${LOCALBASE}/lib > >@@ -114,7 +114,8 @@ > TESTEXTRA_BROKEN= CMake Error: The source directory misses CMakeLists.txt > TESTEXTRA_BUILD_DEPENDS= git:devel/git > TESTEXTRA_USES= cmake python:3 >-TESTEXTRA_MESON_ON= -Dextra_tests=enabled -Dsendmmsg=disabled >+TESTEXTRA_MESON_ON= -Dextra_tests=enabled \ >+ -Dsendmmsg=disabled > TESTEXTRA_MESON_OFF= -Dextra_tests=disabled > > TESTUNIT_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka >diff -ruN /usr/ports/dns/knot-resolver/files/krescachegc.in dns/knot-resolver/files/krescachegc.in >--- /usr/ports/dns/knot-resolver/files/krescachegc.in 2021-04-06 14:21:47.000000000 +0000 >+++ dns/knot-resolver/files/krescachegc.in 2021-06-17 11:10:23.719013000 +0000 >@@ -1,5 +1,7 @@ > #!/bin/sh >- >+# >+# $FreeBSD: head/dns/knot-resolver/files/krescachegc.in 542054 2020-07-11 20:57:41Z pi $ >+# > # PROVIDE: krescachegc > # REQUIRE: SERVERS cleanvar > # KEYWORD: shutdown >diff -ruN /usr/ports/dns/knot-resolver/files/kresd.in dns/knot-resolver/files/kresd.in >--- /usr/ports/dns/knot-resolver/files/kresd.in 2021-04-06 14:21:47.000000000 +0000 >+++ dns/knot-resolver/files/kresd.in 2021-06-22 12:48:10.947095000 +0000 >@@ -1,5 +1,7 @@ > #!/bin/sh >- >+# >+# $FreeBSD: head/dns/knot-resolver/files/kresd.in 542054 2020-07-11 20:57:41Z pi $ >+# > # PROVIDE: kresd > # REQUIRE: NETWORKING > # BEFORE: SERVERS >@@ -21,15 +23,45 @@ > load_rc_config ${name} > > # set defaults >- > kresd_enable=${kresd_enable:-"NO"} > kresd_config=${kresd_config:-"%%ETCDIR%%/${name}.conf"} >+kresd_user="%%USERS%%" >+kresd_group="%%GROUPS%%" >+kresd_rundir="/var/run/${name}" > >-pidfile="%%RUNDIR%%/${name}.pid" >+pidfile="${kresd_rundir}/${name}.pid" > procname="%%PREFIX%%/sbin/${name}" > required_files="${kresd_config}" > >+start_cmd="${name}_start" >+stop_cmd="${name}_stop" >+ > command="/usr/sbin/daemon" >-command_args="-c -f -S -r -P ${pidfile} -- ${procname} -c ${kresd_config} -n -q %%RUNDIR%%" >+command_args="-c -f -S -r -P ${pidfile} -T ${name} -- ${procname} -c ${kresd_config} -n -q ${kresd_rundir}" >+ >+kresd_start() { >+ if [ ! -d /var/run/${name} ]; then >+ install -d -o ${kresd_user} -g ${kresd_group} -m 700 ${kresd_rundir} >+ fi >+ if [ ! -f "${pidfile}" ]; then >+ echo "starting ${name}..." && \ >+ ${command} ${command_args} >+ echo -e "\e[1A\e[K${name} started." >+ else >+ echo "${name} seems already running." >+ fi >+ } >+ >+kresd_stop() { >+ if [ -f "${pidfile}" ]; then >+ echo "stopping ${name}..." && \ >+ for pid in `ps waux | grep ${procname} | grep daemon | awk '{print $2}'`; do \ >+ kill -TERM $pid >+ done >+ echo -e "\e[1A\e[K${name} stopped." >+ else >+ echo "${name} seems not running." >+ fi >+ } > > 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 256221
:
225535
|
225536
|
225548
|
225552
|
225620
|
225993
|
226234