File: init-bottom

package info (click to toggle)
qcontrol 0.5.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 348 kB
  • sloc: ansic: 2,020; sh: 228; makefile: 82
file content (41 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (7)
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
36
37
38
39
40
41
#!/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.
if [ -e /proc/device-tree/model ]; then
	device=$(cat /proc/device-tree/model)
else
	device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
		 head -n1 | sed "s/^[^:]*: //")
fi
case $device in
    "QNAP TS-119/TS-219") break ;;
    "QNAP TS219 family")  break ;;
    "QNAP TS-41x")        break ;;
    "QNAP TS419 family")  break ;;
    *)                    exit 0 ;;
esac

if [ ! -x "/sbin/qcontrol" ]; then
    exit 0
fi

/sbin/qcontrol --direct watchdog off || true

exit 0