the mesh-package provides the information on which device respondd should be running besides mesh-interfaces
This commit is contained in:
parent
8dfa61af2d
commit
f449e31298
@ -0,0 +1 @@
|
|||||||
|
br-client
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /usr/share/libubox/jshn.sh
|
||||||
|
. /lib/functions/service.sh
|
||||||
|
|
||||||
|
DEVLIST=/var/run/gluon-respondd.devs
|
||||||
|
|
||||||
|
ifname_to_dev () {
|
||||||
|
json_load "$(ubus call network.interface.$1 status)"
|
||||||
|
json_get_var dev device
|
||||||
|
|
||||||
|
echo "$dev"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$ACTION" in
|
||||||
|
ifup)
|
||||||
|
DEVICE="$(ifname_to_dev "$INTERFACE")"
|
||||||
|
|
||||||
|
[ "$DEVICE" == $(cat /lib/gluon/respondd/client.dev) ] &&
|
||||||
|
/etc/init.d/gluon-respondd restart_if_running &
|
||||||
|
;;
|
||||||
|
esac
|
@ -13,7 +13,7 @@ LOCK=/var/run/gluon-respondd.lock
|
|||||||
|
|
||||||
do_start() {
|
do_start() {
|
||||||
DEVS=""
|
DEVS=""
|
||||||
for dev in $( ubus call network.interface dump | jsonfilter -e "@.interface[@.proto='gluon_mesh' && @.up=true].device") br-client
|
for dev in $( ubus call network.interface dump | jsonfilter -e "@.interface[@.proto='gluon_mesh' && @.up=true].device") $(cat /lib/gluon/respondd/client.dev)
|
||||||
do
|
do
|
||||||
DEVS="$DEVS -i $dev"
|
DEVS="$DEVS -i $dev"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user