1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/sh
# Qcontrol boot script, disables watchdog
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /scripts/functions
# Begin real processing below this line
# Only needed on TS-219P II and TS-419P II, safe to call on any TS-x19 though.
device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
head -n1 | sed "s/^[^:]*: //")
case $device in
"QNAP TS-119/TS-219") break ;;
"QNAP TS-41x") break ;;
*) exit 0 ;;
esac
if [ ! -x "/sbin/qcontrol" ]; then
exit 0
fi
/sbin/qcontrol --direct watchdog off || true
exit 0
|