Repository : ssh://git@open-mesh.org/openwrt-feed-batman-adv
On branch : master
commit 0224ae6fba596befb6139b7d83360ae78eab39af Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Mar 7 16:22:22 2012 +0000
batman-adv-devel: load kernel module if needed in hotplug script
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
0224ae6fba596befb6139b7d83360ae78eab39af batman-adv-devel/Makefile | 4 ++-- .../files/etc/hotplug.d/net/99-batman-adv | 1 + batman-adv-devel/files/lib/batman-adv/config.sh | 17 ++++++++++++++--- batman-adv-devel/files/usr/sbin/batman-adv | 1 + 4 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/batman-adv-devel/Makefile b/batman-adv-devel/Makefile index ffb9958..603080f 100644 --- a/batman-adv-devel/Makefile +++ b/batman-adv-devel/Makefile @@ -10,8 +10,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv-devel
-PKG_BATMAN_REV:=f86649b10214e8e98bdec161cefa13dcc8cb1e41 -PKG_BATCTL_REV:=1cce9654449331d13b5576e845453ff2613dbe43 +PKG_BATMAN_REV:=0c9a249ef4dcaf733f6c7f64d4ce5c97b4705968 +PKG_BATCTL_REV:=2f71a2e4e6863efa4c1112c7f585d074dce34782
PKG_BATMAN_BRANCH:=$(subst ",,$(CONFIG_KMOD_BATMAN_ADV_DEVEL_BRANCH_NAME)) PKG_BATMAN_SHORTREV:=$(shell echo $(PKG_BATMAN_REV) | cut -c1-7) diff --git a/batman-adv-devel/files/etc/hotplug.d/net/99-batman-adv b/batman-adv-devel/files/etc/hotplug.d/net/99-batman-adv index fe19e64..42d4c29 100644 --- a/batman-adv-devel/files/etc/hotplug.d/net/99-batman-adv +++ b/batman-adv-devel/files/etc/hotplug.d/net/99-batman-adv @@ -2,6 +2,7 @@
. /lib/batman-adv/config.sh
+bat_load_module config_load batman-adv
case "$ACTION" in diff --git a/batman-adv-devel/files/lib/batman-adv/config.sh b/batman-adv-devel/files/lib/batman-adv/config.sh index dfd9580..6f3e533 100644 --- a/batman-adv-devel/files/lib/batman-adv/config.sh +++ b/batman-adv-devel/files/lib/batman-adv/config.sh @@ -1,6 +1,15 @@ #!/bin/sh
-bat_config(){ +bat_load_module() +{ + [ -d "/sys/module/batman_adv/" ] && return + + . /etc/functions.sh + load_modules /etc/modules.d/*-lib-crc16 /etc/modules.d/*-batman-adv +} + +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
@@ -31,7 +40,8 @@ bat_config(){ [ -n "$bridge_loop_avoidance" ] && echo $bridge_loop_avoidance > /sys/class/net/$mesh/mesh/bridge_loop_avoidance }
-bat_add_interface(){ +bat_add_interface() +{ local mesh="$1" local interface="$2" local interfaces @@ -48,7 +58,8 @@ bat_add_interface(){ done }
-bat_del_interface(){ +bat_del_interface() +{ local mesh="$1" local interface="$2" local interfaces diff --git a/batman-adv-devel/files/usr/sbin/batman-adv b/batman-adv-devel/files/usr/sbin/batman-adv index 6580756..93ae1b5 100644 --- a/batman-adv-devel/files/usr/sbin/batman-adv +++ b/batman-adv-devel/files/usr/sbin/batman-adv @@ -26,6 +26,7 @@ stop_mesh() {
# can also be used with "batman-adv start bat0" start() { + bat_load_module config_load batman-adv
if [ -n "$1" ]; then