+++ /dev/null
-#
-# Copyright (C) 2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=om-watchdog
-PKG_RELEASE:=4
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/om-watchdog
- SECTION:=base
- CATEGORY:=Base system
- TITLE:=om watchdog
- URL:=http://openwrt.org/
-endef
-
-define Package/om-watchdog/description
- This package contains the hw watchdog script for the OM1P and OM2P device.
-endef
-
-define Build/Compile
-endef
-
-define Package/om-watchdog/install
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_DIR) $(1)/sbin/
- $(INSTALL_BIN) ./files/om-watchdog.init $(1)/etc/init.d/om-watchdog
- $(INSTALL_BIN) ./files/om-watchdog $(1)/sbin/om-watchdog
-endef
-
-$(eval $(call BuildPackage,om-watchdog))
+++ /dev/null
-#!/bin/sh
-
-GPIO=$1
-
-trap "" INT HUP
-
-echo $GPIO > /sys/class/gpio/export
-echo out > /sys/class/gpio/gpio${GPIO}/direction
-
-while true; do
- echo 1 > /sys/class/gpio/gpio${GPIO}/value
- sleep 1
- echo 0 > /sys/class/gpio/gpio${GPIO}/value
- sleep 180
-done
+++ /dev/null
-#!/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
-}