+4325. [func] Add a line to "rndc status" indicating the
+ hostname and operating system details. [RT #41610]
+
4324. [bug] When deleting records from a zone database, interior
nodes could be left empty but not deleted, damaging
search performance afterward. [RT #40997]
const char *ob = "", *cb = "", *alt = "";
char boottime[ISC_FORMATHTTPTIMESTAMP_SIZE];
char configtime[ISC_FORMATHTTPTIMESTAMP_SIZE];
- char line[1024];
+ char line[1024], hostname[256];
if (ns_g_server->version_set) {
ob = " (";
ns_g_description, ns_g_srcid, ob, alt, cb);
CHECK(putstr(text, line));
+ result = ns_os_gethostname(hostname, sizeof(hostname));
+ if (result != ISC_R_SUCCESS)
+ strlcpy(hostname, "localhost", sizeof(hostname));
+ snprintf(line, sizeof(line), "running on %s: %s\n",
+ hostname, ns_os_uname());
+ CHECK(putstr(text, line));
+
snprintf(line, sizeof(line), "boot time: %s\n", boottime);
CHECK(putstr(text, line));
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
+echo "I:test rndc status shows running on"
+ret=0
+$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > rndc.output /dev/null 2>&1 || ret=1
+grep "^running on " rndc.output > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
exit $status