Commit 4fc34398 authored by Libor Peltan's avatar Libor Peltan

ctl server status: display configure result summary

instead of configure script parameters
parent 128a4ca4
......@@ -536,23 +536,7 @@ AM_CONDITIONAL([HAVE_SPHINXBUILD], test "$SPHINXBUILD" != "false")
AM_CONDITIONAL([HAVE_PDFLATEX], test "$PDFLATEX" != "false")
AM_CONDITIONAL([HAVE_MAKEINFO], test "$MAKEINFO" != "false")
AC_CONFIG_FILES([Makefile
doc/Makefile
libtap/Makefile
tests/Makefile
tests-fuzz/Makefile
samples/Makefile
python/Makefile
src/Makefile
src/contrib/dnstap/Makefile
src/dnssec/Makefile
src/dnssec/tests/Makefile
src/zscanner/Makefile
])
AC_OUTPUT
AC_MSG_RESULT([
result_msg_base="
$PACKAGE $VERSION
Target: $host_os $host_cpu
......@@ -590,6 +574,29 @@ AC_MSG_RESULT([
Code coverage: ${enable_code_coverage}
Bash completions: ${bash_completions_output}
PKCS #11 support: ${enable_pkcs11}
"
result_msg_esc=$(echo -n "$result_msg_base" | sed 's/$/\\n/' | tr -d '\n')
result_msg_add="$result_msg_base
Continue with 'make' command
])
"
AC_DEFINE_UNQUOTED([CONFIGURE_SUMMARY],["$result_msg_esc"],[Configure summary])
AC_CONFIG_FILES([Makefile
doc/Makefile
libtap/Makefile
tests/Makefile
tests-fuzz/Makefile
samples/Makefile
python/Makefile
src/Makefile
src/contrib/dnstap/Makefile
src/dnssec/Makefile
src/dnssec/tests/Makefile
src/zscanner/Makefile
])
AC_OUTPUT
AC_MSG_RESULT([$result_msg_add])
......@@ -71,7 +71,7 @@ Print the program version.
\fBstatus\fP [\fIdetail\fP]
Check if the server is running.
Moreover display either the running knotd version, numbers of worker threads,
or Knot DNS buid (configure) parameters, if the parameter is specified.
or Knot DNS buid (configure) summary, if the parameter is specified.
.TP
\fBstop\fP
Stop the server if running.
......
......@@ -48,7 +48,7 @@ Actions
**status** [*detail*]
Check if the server is running.
Moreover display either the running knotd version, numbers of worker threads,
or Knot DNS buid (configure) parameters, if the parameter is specified.
or Knot DNS buid (configure) summary, if the parameter is specified.
**stop**
Stop the server if running.
......
......@@ -1128,7 +1128,7 @@ static int ctl_zone(ctl_args_t *args, ctl_cmd_t cmd)
static int ctl_server(ctl_args_t *args, ctl_cmd_t cmd)
{
int ret = KNOT_EOK;
char outbuf[256] = { 0 };
char outbuf[2048] = { 0 };
switch (cmd) {
case CTL_STATUS:
......@@ -1140,8 +1140,7 @@ static int ctl_server(ctl_args_t *args, ctl_cmd_t cmd)
"background workers: %zu", conf_udp_threads(conf()),
conf_tcp_threads(conf()), conf_bg_threads(conf()));
} else if (strcasecmp(args->data[KNOT_CTL_IDX_DATA], "configure") == 0) {
snprintf(outbuf, sizeof(outbuf), "Passed CFLAGS: %s; Configure parameters: %s",
CONFIGURE_CFLAGS, CONFIGURE_PARAMS);
snprintf(outbuf, sizeof(outbuf), "%s", CONFIGURE_SUMMARY);
} else if (args->data[KNOT_CTL_IDX_DATA][0] != '\0') {
return KNOT_EINVAL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment