Openwrt/package/kernel/om-watchdog/files/om-watchdog.init
Adrian Schmutzler 4e4ee46495 ar71xx: drop target
This target has been mostly replaced by ath79 and won't be included
in the upcoming release anymore. Finally put it to rest.

This also removes all references in packages, tools, etc. as well as
the uboot-ar71xx and vsc73x5-ucode packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-30 22:18:35 +02:00

37 lines
503 B
Bash

#!/bin/sh /etc/rc.common
#
# Copyright (C) 2011 OpenWrt.org
#
START=11
STOP=11
USE_PROCD=1
NAME=om-watchdog
PROG=/sbin/om-watchdog
get_gpio() {
local board=$(board_name)
if [ "$board" = "teltonika,rut5xx" ]; then
# ramips
return 11
else
#we assume it is om1p in this case
return 3
fi
return 255
}
start_service() {
get_gpio
gpio="$?"
[ "$gpio" != "255" ] || return
procd_open_instance
procd_set_param command "${PROG}" "${gpio}"
procd_set_param respawn
procd_close_instance
}