Skip to content
Snippets Groups Projects
Unverified Commit 5cd62952 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-core: add gluon_mesh netifd proto

This new protocol will allow configuring mesh interfaces independently of
the used mesh protocol.
parent fb587e9b
Branches
Tags
No related merge requests found
#!/bin/sh
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
proto_gluon_mesh_init_config() {
proto_config_add_boolean fixed_mtu
proto_config_add_boolean transitive
}
proto_gluon_mesh_setup() {
export CONFIG="$1"
export IFNAME="$2"
local fixed_mtu transitive
json_get_vars fixed_mtu transitive
export FIXED_MTU="$fixed_mtu"
export TRANSITIVE="$transitive"
for script in /lib/gluon/core/mesh/setup.d/*; do
[ ! -x "$script" ] || "$script"
done
proto_init_update "$IFNAME" 1
proto_send_update "$CONFIG"
}
proto_gluon_mesh_teardown() {
export CONFIG="$1"
export IFNAME="$2"
for script in /lib/gluon/core/mesh/teardown.d/*; do
[ ! -x "$script" ] || "$script"
done
}
add_protocol gluon_mesh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment