From 1dec014e3e1c623743b1ed51c7072d13d7f9492c Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Thu, 20 Apr 2017 13:52:25 +0200 Subject: [PATCH] travelmate: update 0.7.1 * fix startup & json update behavior * LuCI-frontend update (see luci repo for details) Signed-off-by: Dirk Brenken --- net/travelmate/Makefile | 2 +- net/travelmate/files/travelmate.init | 5 ----- net/travelmate/files/travelmate.sh | 11 ++++++++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index c4a13778c9..ed5d6c5fb3 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate -PKG_VERSION:=0.7.0 +PKG_VERSION:=0.7.1 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/travelmate.init b/net/travelmate/files/travelmate.init index 8b988dbd1f..6663dd173d 100755 --- a/net/travelmate/files/travelmate.init +++ b/net/travelmate/files/travelmate.init @@ -11,7 +11,6 @@ trm_script="/usr/bin/travelmate.sh" boot() { - trm_boot=1 ubus -t 30 wait_for network.interface 2>/dev/null rc_procd start_service } @@ -20,10 +19,6 @@ start_service() { if [ $("${trm_init}" enabled; printf ${?}) -eq 0 ] then - if [ -n "${trm_boot}" ] - then - return 0 - fi procd_open_instance "travelmate" procd_set_param command "${trm_script}" "${@}" procd_set_param stdout 1 diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh index 2859a10496..6b9637336f 100755 --- a/net/travelmate/files/travelmate.sh +++ b/net/travelmate/files/travelmate.sh @@ -10,7 +10,7 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -trm_ver="0.7.0" +trm_ver="0.7.1" trm_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')" trm_enabled=0 trm_debug=0 @@ -267,6 +267,15 @@ f_main() sleep 5 done done + else + if [ ! -s "${trm_rtfile}" ] + then + config="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')" + sta_radio="$(uci -q get wireless."${config}".device)" + sta_ssid="$(uci -q get wireless."${config}".ssid)" + sta_iface="$(uci -q get wireless."${config}".network)" + f_jsnupdate "${sta_iface}" "${sta_radio}" "${sta_ssid}" + fi fi } -- 2.30.2