#!/bin/bash

DEV="/dev/watchdog"

PROG="/sbin/watchdog"


test -x ${PROG} || exit 0
test -c ${DEV} || exit 0

test -n "${OS_VERSION}" || source /etc/init.d/base


case "$1" in
    start)
        msg_begin "Starting watchdog"
        ${PROG} -t 5 ${DEV}
        test $? == 0 && msg_done || msg_fail
        ;;
    
    stop)
        true
        ;;

    reallystop)
        msg_begin "Stopping watchdog"
        killall -q $(basename ${PROG})
        test $? == 0 && msg_done || msg_fail
        ;;

    *)
        echo $"Usage: $0 {start|reallystop}"
        exit 1
esac

exit $?

