From 92e23a0bfcaf9baa79e7675e7e5077ff0ac33a2c Mon Sep 17 00:00:00 2001 From: Sukru Senli Date: Thu, 22 Jun 2017 15:05:17 +0200 Subject: [PATCH] inteno-netmodes: netmode-client-detect: do not run timed_check in background --- inteno-netmodes/files/sbin/netmode-client-detect | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/inteno-netmodes/files/sbin/netmode-client-detect b/inteno-netmodes/files/sbin/netmode-client-detect index ca1734f2e..19c13ccc8 100755 --- a/inteno-netmodes/files/sbin/netmode-client-detect +++ b/inteno-netmodes/files/sbin/netmode-client-detect @@ -8,11 +8,8 @@ local action ipaddr macaddr network timed_check() { - while true; do - ubus call repeater get_creds '{"network":"lan","file":"/tmp/wificontrol.txt"}' - wificontrol --router - sleep $1 - done + ubus call repeater get_creds '{"network":"lan","file":"/tmp/wificontrol.txt"}' + wificontrol --router } is_inteno_macaddr() @@ -31,8 +28,6 @@ is_inteno_macaddr() false } -timed_check 60 & - while true ; do ubus -t 60 listen client | \ while read event ; do @@ -51,4 +46,7 @@ while true ; do /sbin/wificontrol --router --destination $ipaddr fi done + sleep 5 + timed_check done +