![marek](/assets/img/avatar_default.png)
Also split init script into lib and init script as suggested by Filippo Sallemi to allow including the lib from a hotplug script. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> git-svn-id: svn://svn.openwrt.org/openwrt/packages@28066 3c298f89-4303-0410-b956-a3cf2f4a3e73
29 lines
428 B
Bash
29 lines
428 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2011 OpenWrt.org
|
|
|
|
START=90
|
|
|
|
. /lib/batman-adv/config.sh
|
|
|
|
# can also be used with "batman-adv start bat0"
|
|
start() {
|
|
config_load batman-adv
|
|
|
|
if [ -n "$1" ]; then
|
|
start_mesh $1
|
|
else
|
|
config_foreach start_mesh mesh
|
|
fi
|
|
}
|
|
|
|
# can also be used with "batman-adv stop bat0"
|
|
stop () {
|
|
config_load batman-adv
|
|
|
|
if [ -n "$1" ]; then
|
|
stop_mesh $1
|
|
else
|
|
config_foreach stop_mesh mesh
|
|
fi
|
|
}
|