mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-13 12:32:29 +01:00
inteno-netmodes: netmode-client-detect: put timed_check to background
This commit is contained in:
parent
5c312b3d84
commit
ab34a5ba66
1 changed files with 9 additions and 7 deletions
|
|
@ -8,9 +8,12 @@
|
|||
local action ipaddr macaddr network
|
||||
|
||||
timed_check() {
|
||||
network=${network:-lan}
|
||||
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
|
||||
wificontrol --router
|
||||
while true; do
|
||||
network=${network:-lan}
|
||||
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
|
||||
wificontrol --router
|
||||
sleep $1
|
||||
done
|
||||
}
|
||||
|
||||
is_inteno_macaddr()
|
||||
|
|
@ -29,8 +32,10 @@ is_inteno_macaddr()
|
|||
false
|
||||
}
|
||||
|
||||
timed_check 60 &
|
||||
|
||||
while true ; do
|
||||
ubus -t 60 listen client | \
|
||||
ubus listen client | \
|
||||
while read event ; do
|
||||
#echo "netmode-client-detect got event: $event" >/dev/console
|
||||
json_load "$event"
|
||||
|
|
@ -47,7 +52,4 @@ while true ; do
|
|||
/sbin/wificontrol --router --destination $ipaddr
|
||||
fi
|
||||
done
|
||||
sleep 5
|
||||
timed_check
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue