Repository : ssh://git@open-mesh.org/openwrt-feed-batman-adv
On branch : master
commit 380c8253c5f8798ad01e359f25efb915bb2d6f1e Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jun 19 15:03:10 2012 +0000
batman-adv-devel: script cleanups
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
380c8253c5f8798ad01e359f25efb915bb2d6f1e batman-adv-devel/Config.in | 6 +++--- batman-adv-devel/files/lib/batman-adv/config.sh | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/batman-adv-devel/Config.in b/batman-adv-devel/Config.in index f67f69e..e1b70df 100644 --- a/batman-adv-devel/Config.in +++ b/batman-adv-devel/Config.in @@ -4,9 +4,9 @@ config KMOD_BATMAN_ADV_DEVEL_DEBUG_LOG depends PACKAGE_kmod-batman-adv-devel default n config KMOD_BATMAN_ADV_DEVEL_BLA - bool "enable bridge loop avoidance" - depends PACKAGE_kmod-batman-adv-devel - default y + bool "enable bridge loop avoidance" + depends PACKAGE_kmod-batman-adv-devel + default y config KMOD_BATMAN_ADV_DEVEL_BATCTL bool "enable batctl" depends PACKAGE_kmod-batman-adv-devel diff --git a/batman-adv-devel/files/lib/batman-adv/config.sh b/batman-adv-devel/files/lib/batman-adv/config.sh index 00441a3..295b543 100644 --- a/batman-adv-devel/files/lib/batman-adv/config.sh +++ b/batman-adv-devel/files/lib/batman-adv/config.sh @@ -11,35 +11,36 @@ bat_load_module() bat_config() { local mesh="$1" - local aggregated_ogms bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval hop_penalty vis_mode + local aggregated_ogms ap_isolation bonding bridge_loop_avoidance fragmentation gw_bandwidth + local gw_mode gw_sel_class hop_penalty log_level orig_interval vis_mode
config_get aggregated_ogms "$mesh" aggregated_ogms + config_get ap_isolation "$mesh" ap_isolation config_get bonding "$mesh" bonding + config_get bridge_loop_avoidance "$mesh" bridge_loop_avoidance config_get fragmentation "$mesh" fragmentation config_get gw_bandwidth "$mesh" gw_bandwidth config_get gw_mode "$mesh" gw_mode config_get gw_sel_class "$mesh" gw_sel_class + config_get hop_penalty "$mesh" hop_penalty config_get log_level "$mesh" log_level 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 - config_get bridge_loop_avoidance "$mesh" bridge_loop_avoidance
[ ! -f "/sys/class/net/$mesh/mesh/orig_interval" ] && echo "batman-adv mesh $mesh does not exist - check your interface configuration" && return 1
- [ -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 "$log_level" ] && echo $log_level > /sys/class/net/$mesh/mesh/log_level 2>&- [ -n "$aggregate_ogms" ] && echo $aggregate_ogms > /sys/class/net/$mesh/mesh/aggregate_ogms + [ -n "$ap_isolation" ] && echo $ap_isolation > /sys/class/net/$mesh/mesh/ap_isolation [ -n "$bonding" ] && echo $bonding > /sys/class/net/$mesh/mesh/bonding + [ -n "$bridge_loop_avoidance" ] && echo $bridge_loop_avoidance > /sys/class/net/$mesh/mesh/bridge_loop_avoidance [ -n "$fragmentation" ] && echo $fragmentation > /sys/class/net/$mesh/mesh/fragmentation [ -n "$gw_bandwidth" ] && echo $gw_bandwidth > /sys/class/net/$mesh/mesh/gw_bandwidth [ -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 "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty + [ -n "$log_level" ] && echo $log_level > /sys/class/net/$mesh/mesh/log_level 2>&- + [ -n "$orig_interval" ] && echo $orig_interval > /sys/class/net/$mesh/mesh/orig_interval [ -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 - [ -n "$bridge_loop_avoidance" ] && echo $bridge_loop_avoidance > /sys/class/net/$mesh/mesh/bridge_loop_avoidance }
bat_add_interface()