config_get orig_interval "$mesh" orig_interval
config_get hop_penalty "$mesh" hop_penalty
config_get vis_mode "$mesh" vis_mode
+ config_get ap_isolation "$mesh" ap_isolation
[ -n "$orig_interval" ] && echo $orig_interval > /sys/class/net/$mesh/mesh/orig_interval
[ -n "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty
[ -n "$gw_mode" ] && echo $gw_mode > /sys/class/net/$mesh/mesh/gw_mode
[ -n "$gw_sel_class" ] && echo $gw_sel_class > /sys/class/net/$mesh/mesh/gw_sel_class
[ -n "$vis_mode" ] && echo $vis_mode > /sys/class/net/$mesh/mesh/vis_mode
+ [ -n "$ap_isolation" ] && echo $ap_isolation > /sys/class/net/$mesh/mesh/ap_isolation
+
}
bat_add_interface(){
-#!/bin/sh /etc/rc.common
+#!/bin/sh
# Copyright (C) 2011 OpenWrt.org
+. /etc/functions.sh
. /lib/batman-adv/config.sh
start_mesh() {
config_foreach stop_mesh mesh
fi
}
+
+restart() {
+ stop $1
+ start $1
+}
+
+case "$1" in
+ start) start $2 ;;
+ stop) stop $2 ;;
+ restart) restart $2 ;;
+ *) echo "Usage: batman-adv <start|stop|restart> [mesh instance]"
+esac