rc.shutdown: print a newline before watchdog timeout message

Previously the watchdog timeout message was appended to the last entry
in the "Waiting for PIDS" list, resulting in a message like

    Waiting for PIDS: 31299 31296 90201 9020090 second watchdog timeout
    expired. Shutdown terminated.

Print a newline to separate the watchdog timeout message.  Also perform
the kill before logging or echoing the message.

PR:		241072
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2019-11-07 15:48:46 +00:00
parent 4011767f76
commit 4a76bd99ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354446

View File

@ -69,12 +69,13 @@ _rcshutdown_watchdog=
if [ -n "$rcshutdown_timeout" ]; then
debug "Initiating watchdog timer."
sleep $rcshutdown_timeout && (
kill -KILL $$ >/dev/null 2>&1
_msg="$rcshutdown_timeout second watchdog"
_msg="$_msg timeout expired. Shutdown terminated."
logger -t rc.shutdown "$_msg"
echo
echo "$_msg"
date
kill -KILL $$ >/dev/null 2>&1
) &
_rcshutdown_watchdog=$!
fi