fix init scripts and config files
git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10236 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
fa63f85077
commit
8000d384f2
2 changed files with 18 additions and 11 deletions
|
@ -1,8 +1,10 @@
|
||||||
config batman general
|
config batmand general
|
||||||
option interface ath0
|
option interface ath0
|
||||||
option announce
|
option announce
|
||||||
option gateway_class
|
option gateway_class
|
||||||
option originator_interval
|
option originator_interval
|
||||||
option preferred_gateway
|
option preferred_gateway
|
||||||
option routing_class
|
option routing_class
|
||||||
option visualisation_srv
|
option visualisation_srv
|
||||||
|
option policy_routing_script
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
START=100
|
START=90
|
||||||
. /lib/config/uci.sh
|
. /lib/config/uci.sh
|
||||||
uci_load batman
|
uci_load batmand
|
||||||
start () {
|
start () {
|
||||||
interface=$(uci get batman.general.interface)
|
interface=$(uci get batmand.general.interface)
|
||||||
if [ "$interface" = "" ]; then
|
if [ "$interface" = "" ]; then
|
||||||
echo $1 Error, you must specify at least a network interface
|
echo $1 Error, you must specify at least a network interface
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
announce=$(uci get batman.general.announce)
|
announce=$(uci get batmand.general.announce)
|
||||||
gateway_class=$(uci get batman.general.gateway_class)
|
gateway_class=$(uci get batmand.general.gateway_class)
|
||||||
originator_interval=$(uci get batman.general.originator_interval)
|
originator_interval=$(uci get batmand.general.originator_interval)
|
||||||
preferred_gateway=$(uci get batman.general.preferred_gateway)
|
preferred_gateway=$(uci get batmand.general.preferred_gateway)
|
||||||
routing_class=$(uci get batman.general.routing_class)
|
routing_class=$(uci get batmand.general.routing_class)
|
||||||
visualisation_srv=$(uci get batman.general.visualisation_srv)
|
visualisation_srv=$(uci get batmand.general.visualisation_srv)
|
||||||
|
policy_routing_script=$(uci get batmand.general.policy_routing_script)
|
||||||
batman_args=""
|
batman_args=""
|
||||||
|
|
||||||
if [ $announce ]; then
|
if [ $announce ]; then
|
||||||
|
@ -39,6 +40,10 @@ start () {
|
||||||
if [ $visualisation_srv ]; then
|
if [ $visualisation_srv ]; then
|
||||||
batman_args=${batman_args}'-s '$visualisation_srv' '
|
batman_args=${batman_args}'-s '$visualisation_srv' '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $policy_routing_script ]; then
|
||||||
|
batman_args=${batman_args}'--policy-routing-script '$policy_routing_script' '
|
||||||
|
fi
|
||||||
|
|
||||||
batman_args=${batman_args}$interface
|
batman_args=${batman_args}$interface
|
||||||
batmand $batman_args >/dev/null 2>&1
|
batmand $batman_args >/dev/null 2>&1
|
||||||
|
|
Loading…
Reference in a new issue