1 #!/bin/sh /etc/rc.common
11 local originator_interval
12 local preferred_gateway
14 local visualisation_srv
15 local local policy_routing_script
16 local disable_client_nat
17 local disable_aggregation
19 [ "$config" = "general" ] ||
return 1
21 config_get interface
"$config" interface
22 if [ "$interface" = "" ]; then
23 echo $1 Error
, you must specify
at least a network interface
27 config_get hnas
"$config" hna
28 config_get gateway_class
"$config" gateway_class
29 config_get originator_interval
"$config" originator_interval
30 config_get preferred_gateway
"$config" preferred_gateway
31 config_get routing_class
"$config" routing_class
32 config_get visualisation_srv
"$config" visualisation_srv
33 config_get policy_routing_script
"$config" policy_routing_script
34 config_get disable_client_nat
"$config" disable_client_nat
35 config_get disable_aggregation
"$config" disable_aggregation
40 batman_args
=${batman_args}'-a '$hna' '
43 if [ $gateway_class ]; then
44 batman_args
=${batman_args}'-g '$gateway_class' '
47 if [ $originator_interval ]; then
48 batman_args
=${batman_args}'-o '$originator_interval' '
51 if [ $preferred_gateway ]; then
52 batman_args
=${batman_args}'-p '$preferred_gateway' '
55 if [ $routing_class ]; then
56 batman_args
=${batman_args}'-r '$routing_class' '
59 if [ $visualisation_srv ]; then
60 batman_args
=${batman_args}'-s '$visualisation_srv' '
63 if [ $policy_routing_script ]; then
64 batman_args
=${batman_args}'--policy-routing-script '$policy_routing_script' '
67 if [ $disable_client_nat ]; then
68 batman_args
=${batman_args}'--disable-client-nat '
71 if [ $disable_aggregation ]; then
72 batman_args
=${batman_args}'--disable-aggregation '
75 procd_open_instance
"${config}"
76 procd_set_param
command /usr
/sbin
/batmand
77 procd_append_param
command --no-detach
78 procd_append_param
command ${batman_args}
79 procd_append_param
command ${interface}
80 procd_set_param netdev
${interface}
86 config_foreach batmand_start batmand
90 procd_add_reload_trigger
"batmand"