From 25414d41e0e58ae6059805dd09baea5951af7e48 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Thu, 24 Jan 2008 12:49:24 +0000 Subject: [PATCH] fix init scripts and config files SVN-Revision: 10236 --- .../files/etc/config/batmand-adv | 6 +--- .../files/etc/init.d/batmand-adv | 30 ++++--------------- net/batman/files/etc/config/batmand | 6 ++-- net/batman/files/etc/init.d/batmand | 23 ++++++++------ 4 files changed, 24 insertions(+), 41 deletions(-) diff --git a/net/batman-advanced/files/etc/config/batmand-adv b/net/batman-advanced/files/etc/config/batmand-adv index 16fc281bf..19c2c665f 100644 --- a/net/batman-advanced/files/etc/config/batmand-adv +++ b/net/batman-advanced/files/etc/config/batmand-adv @@ -1,8 +1,4 @@ -config batman-adv general +config batmand-adv general option interface ath0 - option announce - option gateway_class option originator_interval - option preferred_gateway - option routing_class option visualisation_srv diff --git a/net/batman-advanced/files/etc/init.d/batmand-adv b/net/batman-advanced/files/etc/init.d/batmand-adv index 260354642..9555346ce 100644 --- a/net/batman-advanced/files/etc/init.d/batmand-adv +++ b/net/batman-advanced/files/etc/init.d/batmand-adv @@ -1,41 +1,21 @@ #!/bin/sh /etc/rc.common -START=100 +START=90 . /lib/config/uci.sh -uci_load batman-adv +uci_load batmand-adv start () { - interface=$(uci get batman-adv.general.interface) + interface=$(uci get batmand-adv.general.interface) if [ "$interface" = "" ]; then echo $1 Error, you must specify at least a network interface exit fi - announce=$(uci get batman-adv.general.announce) - gateway_class=$(uci get batman-adv.general.gateway_class) - originator_interval=$(uci get batman-adv.general.originator_interval) - preferred_gateway=$(uci get batman-adv.general.preferred_gateway) - routing_class=$(uci get batman-adv.general.routing_class) - visualisation_srv=$(uci get batman-adv.general.visualisation_srv) + originator_interval=$(uci get batmand-adv.general.originator_interval) + visualisation_srv=$(uci get batmand-adv.general.visualisation_srv) batman_args="" - if [ $announce ]; then - batman_args=${batman_args}'-a '$announce' ' - fi - - if [ $gateway_class ]; then - batman_args=${batman_args}'-g '$gateway_class' ' - fi - if [ $originator_interval ]; then batman_args=${batman_args}'-o '$originator_interval' ' fi - if [ $preferred_gateway ]; then - batman_args=${batman_args}'-p '$preferred_gateway' ' - fi - - if [ $routing_class ]; then - batman_args=${batman_args}'-r '$routing_class' ' - fi - if [ $visualisation_srv ]; then batman_args=${batman_args}'-s '$visualisation_srv' ' fi diff --git a/net/batman/files/etc/config/batmand b/net/batman/files/etc/config/batmand index 15587bcca..95ec3fab2 100644 --- a/net/batman/files/etc/config/batmand +++ b/net/batman/files/etc/config/batmand @@ -1,8 +1,10 @@ -config batman general +config batmand general option interface ath0 option announce option gateway_class option originator_interval option preferred_gateway option routing_class - option visualisation_srv + option visualisation_srv + option policy_routing_script + diff --git a/net/batman/files/etc/init.d/batmand b/net/batman/files/etc/init.d/batmand index b0e9886c7..5f255ed41 100644 --- a/net/batman/files/etc/init.d/batmand +++ b/net/batman/files/etc/init.d/batmand @@ -1,19 +1,20 @@ #!/bin/sh /etc/rc.common -START=100 +START=90 . /lib/config/uci.sh -uci_load batman +uci_load batmand start () { - interface=$(uci get batman.general.interface) + interface=$(uci get batmand.general.interface) if [ "$interface" = "" ]; then echo $1 Error, you must specify at least a network interface exit fi - announce=$(uci get batman.general.announce) - gateway_class=$(uci get batman.general.gateway_class) - originator_interval=$(uci get batman.general.originator_interval) - preferred_gateway=$(uci get batman.general.preferred_gateway) - routing_class=$(uci get batman.general.routing_class) - visualisation_srv=$(uci get batman.general.visualisation_srv) + announce=$(uci get batmand.general.announce) + gateway_class=$(uci get batmand.general.gateway_class) + originator_interval=$(uci get batmand.general.originator_interval) + preferred_gateway=$(uci get batmand.general.preferred_gateway) + routing_class=$(uci get batmand.general.routing_class) + visualisation_srv=$(uci get batmand.general.visualisation_srv) + policy_routing_script=$(uci get batmand.general.policy_routing_script) batman_args="" if [ $announce ]; then @@ -39,6 +40,10 @@ start () { if [ $visualisation_srv ]; then batman_args=${batman_args}'-s '$visualisation_srv' ' fi + + if [ $policy_routing_script ]; then + batman_args=${batman_args}'--policy-routing-script '$policy_routing_script' ' + fi batman_args=${batman_args}$interface batmand $batman_args >/dev/null 2>&1 -- 2.30.2