mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Separate watchdog and modem init for z8102
This commit is contained in:
parent
a5e026d6eb
commit
a4cd28a5d1
3 changed files with 20 additions and 6 deletions
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=z8102
|
PKG_NAME:=z8102
|
||||||
PKG_VERSION:=0.1
|
PKG_VERSION:=0.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com>
|
PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com>
|
||||||
|
|
||||||
|
@ -31,8 +31,6 @@ endef
|
||||||
|
|
||||||
define Package/z8102/install
|
define Package/z8102/install
|
||||||
$(CP) ./files/* $(1)/
|
$(CP) ./files/* $(1)/
|
||||||
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,z8102))
|
$(eval $(call BuildPackage,z8102))
|
||||||
|
|
|
@ -41,7 +41,4 @@ start_service()
|
||||||
# run modem 2
|
# run modem 2
|
||||||
i=460
|
i=460
|
||||||
echo "1" > /sys/class/gpio/gpio${i}/value
|
echo "1" > /sys/class/gpio/gpio${i}/value
|
||||||
|
|
||||||
# watchdog
|
|
||||||
/usr/lib/custom/wdg.sh &
|
|
||||||
}
|
}
|
||||||
|
|
19
z8102/files/etc/init.d/z8102-wdg
Executable file
19
z8102/files/etc/init.d/z8102-wdg
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2013 OpenWrt.org
|
||||||
|
# Copyright (C) 2023 Yannick Chabanois (Ycarus) for OpenMPTCProuter
|
||||||
|
|
||||||
|
START=30
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
log() {
|
||||||
|
logger -t "z8102-wdg" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
start_service()
|
||||||
|
{
|
||||||
|
# watchdog
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command /usr/lib/custom/wdg.sh
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue