[master] add OS details to rndc status

4325.	[func]		Add a line to "rndc status" indicating the
			hostname and operating system details. [RT #41610]
This commit is contained in:
Evan Hunt
2016-03-03 22:02:52 -08:00
parent 44c86318ed
commit 023ba1e6ef
3 changed files with 18 additions and 1 deletions

View File

@@ -441,4 +441,11 @@ $RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf reconfig > /dev/null 2>&1 && r
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