fix typos in the init script
[openwrt/svn-archive/archive.git] / net / batman-advanced / files / etc / init.d / batman-adv-kernelland
1 #!/bin/sh /etc/rc.common
2 START=90
3 . /lib/config/uci.sh
4 uci_load batman-adv-kernelland
5 start () {
6 interfaces=$(uci get batman-adv-kernelland.general.interface)
7 if [ "$interfaces" = "" ]; then
8 echo $1 Error, you must specify at least a network interface
9 exit
10 fi
11
12 for interface in $interfaces
13 do
14 echo $interface > /proc/net/batman-adv/interfaces
15 done
16
17 originator_interval=$(uci get batman-adv-kernelland.general.originator_interval)
18 log_level=$(uci get batman-adv-kernelland.general.log_level)
19
20 if [ $originator_interval ]; then
21 echo $originator_interval > /proc/net/batman-adv/originator_interval
22 fi
23
24 if [ $log_level ]; then
25 echo $log_level > /proc/net/batman-adv/log_level
26 fi
27 }
28
29 restart () {
30 $0 stop
31 sleep 3
32 $0 start
33 }
34
35 stop () {
36 echo "" > /proc/net/batman-adv/interfaces
37 }