Anyone know what this script is for /etc/init.d/watchdog.sh

#!/bin/sh

#
# How long should watchdog's timer be? It takes 8 seconds from when I
# emit control-alt-delete until the logs stop. 10 or 15 would suffice
# in that case, and I doubt the user will still have the battery in
# place if it stays hung for 60 seconds.
#
# Should probably be a parameter. Will have to be a parameter if
# called from rcU.d before the updater runs.
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin

SLEEP_SECONDS=60

[ -f /etc/default/watchdog ] && source /etc/default/watchdog

echo "$0 starting" | logger -s

case "$1" in
start|stop)
# do nothing
;;
*)
echo "usage $0 start|stop # reboot or shutdown using tellbootie after $S
echo " # with decision to reboot or shutdown based on current runleve
echo " # (start and stop parameters ignored.) \\" >&2
exit 1
;;
esac

set $(runlevel || true)
CUR=$2

# default is reboot; only runlevel 0 goes to shutdown
if [ "$CUR" = 0 ]; then
REASON=shutdown
else
REASON=reboot
fi

# save reason. If another watchdog is launched later reason will be
# overwritten and so will provide what we do when we wake.
echo "$REASON" > $REASON_FILE

# The actual sleep-and-tell code is in a block that can be
# backgrounded. Callers expect this script to return and not to have
# to background it themselves. Run this in the background, then
# capture PID using $!
{
sleep $SLEEP_SECONDS

# Read the reason back out of file, default to reboot if anything
# went wrong.
[ -f $REASON_FILE ] && REASON=$(cat $REASON_FILE)
case "$REASON" in
reboot|shutdown)
;; # nothing to do
*) REASON=reboot
;;
esac

# nuke all our omit files (in case multiple watchdogs were
# launched) so that they're not there after reboot. But: what to
# do about case where we don't run (the normal case)? Somebody
# needs to clean these up on boot. For now, clear the directory
# in mountall.sh?
echo "$0 tellbootie $REASON" | tee /dev/console | logger
sleep 3 # give message time to get out
tellbootie $REASON
} &
WATCH_PID=$!

mkdir -p $OMIT_DIR
OMIT_FILE=$OMIT_DIR/watchdog.$WATCH_PID.pid
echo $WATCH_PID > $OMIT_FILE
echo "$0 sleeping for $SLEEP_SECONDS" | tee /dev/console
echo " to stop watchdog run 'kill $WATCH_PID'"