3d2666b2146732ef210d76321fa9ba4cfa21c566
[openwrt.git] / package / om-watchdog / files / om-watchdog.init
1 #!/bin/sh /etc/rc.common
2 #
3 # Copyright (C) 2011 OpenWrt.org
4 #
5
6 START=11
7
8 SERVICE_DAEMONIZE=1
9
10 boot() {
11         if [ -r /lib/ar71xx.sh ]; then
12                 . /lib/ar71xx.sh
13                 local board=$(ar71xx_board_name)
14
15                 if [ "$board" = "om2p" ]; then
16                         service_start /sbin/om-watchdog 12
17                 elif [ "$board" = "om2p-lc" ]; then
18                         service_start /sbin/om-watchdog 26
19                 fi
20         else
21                 #we assume it is om1p in this case
22                 service_start /sbin/om-watchdog 3
23         fi
24 }