packages/net/batman-advanced/files/etc/init.d/batman-adv-kernelland
marek d46da905fe [batman-adv] batctl replaces battool for testing / debugging / configuration
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16662 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-07-03 15:17:39 +00:00

30 lines
581 B
Bash

#!/bin/sh /etc/rc.common
START=90
start () {
interfaces=$(uci get batman-adv-kernelland.general.interface)
if [ "$interfaces" = "" ]; then
echo $1 Error, you must specify at least a network interface
exit
fi
batctl interface $interfaces
originator_interval=$(uci get batman-adv-kernelland.general.originator_interval)
log_level=$(uci get batman-adv-kernelland.general.log_level)
if [ $originator_interval ]; then
batctl interval $originator_interval
fi
if [ $log_level ]; then
batctl loglevel $log_level
fi
}
stop () {
batctl interface none
}