diff --git a/openwrt/freewtp/files/wtp.init b/openwrt/freewtp/files/wtp.init index 79b92aa..3b686e5 100755 --- a/openwrt/freewtp/files/wtp.init +++ b/openwrt/freewtp/files/wtp.init @@ -7,6 +7,11 @@ PROG=/usr/bin/wtp wtp_conf_header() { + . /etc/openwrt_release + model="$(cat /tmp/sysinfo/model)" + bootver="$(strings /dev/mtd0 | grep '^U-Boot.*\..*\(.* .*\)$' | head -n1)" + [ -z "$bootver" ] && bootver="unknown" + linuxver="$(cat /proc/version)" cat < /tmp/etc/wtp.conf } start_service() { + [ -e /tmp/etc/wtp.conf ] && rm /tmp/etc/wtp.conf config_load wtp config_foreach wtp_uci_conf wtp