34ca09c0fc
git-svn-id: svn://svn.openwrt.org/openwrt/packages@14803 3c298f89-4303-0410-b956-a3cf2f4a3e73
38 lines
826 B
Bash
38 lines
826 B
Bash
#!/bin/sh /etc/rc.common
|
|
START=90
|
|
. /lib/config/uci.sh
|
|
uci_load batmand-adv-kernelland
|
|
start () {
|
|
interfaces=$(uci get batmand-adv-kernalland.general.interface)
|
|
if [ "$interface" = "" ]; then
|
|
echo $1 Error, you must specify at least a network interface
|
|
exit
|
|
fi
|
|
|
|
for interface in interfaces
|
|
do
|
|
echo $interface > /proc/net/batman-adv/interfaces
|
|
done
|
|
|
|
originator_interval=$(uci get batmand-adv-kernalland.general.originator_interval)
|
|
log_level=$(uci get batmand-adv-kernalland.general.log_level)
|
|
|
|
if [ $originator_interval ]; then
|
|
echo $originator_interval > /proc/net/batman-adv/originator_interval
|
|
fi
|
|
|
|
if [ $log_level ]; then
|
|
echo $log_level > /proc/net/batman-adv/log_level
|
|
fi
|
|
}
|
|
|
|
restart () {
|
|
$0 stop
|
|
sleep 3
|
|
$0 start
|
|
}
|
|
|
|
stop () {
|
|
echo "" > /proc/net/batman-adv/interfaces
|
|
}
|