packages/net/batman-advanced/files/etc/init.d/batman-adv-kernelland

30 lines
581 B
Plaintext
Raw Normal View History

#!/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
}