FreeBSD Bugzilla – Attachment 226234 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 final
knot-resolver.diff (text/plain), 5.12 KB, created by
Leo Vandewoestijne
on 2021-07-05 11:57:19 UTC
(
hide
)
Description:
knot-resolver final
Filename:
MIME Type:
Creator:
Leo Vandewoestijne
Created:
2021-07-05 11:57:19 UTC
Size:
5.12 KB
patch
obsolete
>diff --git a/dns/knot-resolver/Makefile b/dns/knot-resolver/Makefile >index d2045d364e4f..a8b0aca3700e 100644 >--- a/dns/knot-resolver/Makefile >+++ b/dns/knot-resolver/Makefile >@@ -59,7 +59,6 @@ MESON_ARGS= --buildtype=release \ > --pkg-config-path=${PREFIX}/libdata/pkgconfig \ > --prefix=${LOCALBASE} \ > -Dclient=enabled \ >- -Duser=${USERS} \ > -Dgroup=${GROUPS} \ > -Dinstall_kresd_conf=enabled \ > -Dkeyfile_default=${ETCDIR}/root.keys \ >@@ -73,17 +72,25 @@ CONFLICTS= knot-1.* knot1-[0-6].* > > SUB_FILES= pkg-message > >-SUB_LIST= USERS=${USERS} \ >- GROUPS=${GROUPS} \ >- RUNDIR=${RUNDIR} >+KRESD_USER= kresd >+KRESD_GROUP= kresd >+KRESD_RUNDIR= /var/run/kresd >+ >+SUB_LIST= GROUPS=${KRESD_GROUP} \ >+ RUNDIR=${KRESD_RUNDIR} \ >+ USERS=${KRESD_USER} >+ >+USERS= ${KRESD_USER} >+GROUPS= ${KRESD_GROUP} >+RUNDIR= ${KRESD_RUNDIR} > >-USERS= kresd >-GROUPS= kresd >-RUNDIR= /var/run/kresd >+PLIST_SUB= GROUPS=${GROUPS} \ >+ RUNDIR=${RUNDIR} \ >+ USERS=$USERS} > >-PLIST_SUB= USERS=${USERS} \ >- GROUPS=${GROUPS} \ >- RUNDIR=${RUNDIR} >+PORTDOCS= AUTHORS COPYING CodingStyle NEWS README.md >+PORTEXAMPLES= config.cluster config.docker config.internal config.isp \ >+ config.personal config.privacy config.splitview > > OPTIONS_DEFINE= DOCS EXAMPLES DNSTAP ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF TESTEXTRA > OPTIONS_DEFAULT= DOCS EXAMPLES ROOTKEYS TRUSTANCHOR TEST TESTUNIT >@@ -114,7 +121,8 @@ TESTCONF_MESON_OFF= -Dconfig_tests=disabled > 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 >@@ -124,10 +132,6 @@ TESTUNIT_MESON_OFF= -Dunit_tests=disabled > TRUSTANCHOR_MESON_ON= -Dmanaged_ta=enabled > TRUSTANCHOR_MESON_OFF= -Dmanaged_ta=disabled > >-PORTDOCS= AUTHORS COPYING CodingStyle NEWS README.md >-PORTEXAMPLES= config.cluster config.docker config.internal config.isp \ >- config.personal config.privacy config.splitview >- > STRIP_TARGETS= sbin/kres-cache-gc \ > sbin/kresc \ > sbin/kresd \ >diff --git a/dns/knot-resolver/files/krescachegc.in b/dns/knot-resolver/files/krescachegc.in >index 44912be08123..163d4101df9e 100644 >--- a/dns/knot-resolver/files/krescachegc.in >+++ b/dns/knot-resolver/files/krescachegc.in >@@ -20,7 +20,6 @@ rcvar=krescachegc_enable > load_rc_config ${name} > > # set defaults >- > krescachegc_enable=${krescachegc_enable:-"NO"} > krescachegc_millis=${krescachegc_millis:-"1000"} > >@@ -28,6 +27,6 @@ pidfile="%%RUNDIR%%/${name}.pid" > procname="%%PREFIX%%/sbin/kres-cache-gc" > > command=/usr/sbin/daemon >-command_args="-c -f -r -P ${pidfile} -u %%USERS%% -- ${procname} -c %%RUNDIR%% -d ${krescachegc_millis}" >+command_args="-c -f -S -r -P ${pidfile} -T ${name} -u %%USERS%% -- ${procname} -d ${krescachegc_millis}" > > run_rc_command "$1" >diff --git a/dns/knot-resolver/files/kresd.in b/dns/knot-resolver/files/kresd.in >index 1aa44de36514..344bf82f9479 100644 >--- a/dns/knot-resolver/files/kresd.in >+++ b/dns/knot-resolver/files/kresd.in >@@ -21,15 +21,45 @@ rcvar=kresd_enable > 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} already seems to be 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 to be 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
Flags:
freebsd
:
maintainer-approval-
Actions:
View
|
Diff
Attachments on
bug 256221
:
225535
|
225536
|
225548
|
225552
|
225620
|
225993
| 226234