batman executor: Work around excution order limitations for now.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-10-06 05:17:48 +02:00
parent 27a7201b45
commit 13a8daf96e

View file

@ -68,13 +68,18 @@ set_routing_algo () {
# #
# Functions to manage B.A.T.M.A.N. adv. underlay interfaces (hardifs) # Functions to manage B.A.T.M.A.N. adv. underlay interfaces (hardifs)
set_hardif_options () { set_hardif_options () {
if [ "${IF_BATMAN_HOP_PENALTY}" ]; then # Query hardif parameter manually for now
${MOCK} batctl hardif "${IFACE}" hop_penalty "${IF_BATMAN_HOP_PENALTY}" for hardif in ${IF_BATMAN_IFACES}; do
penalty=$(ifquery -p "batman-hop-penalty" "${hardif}")
if [ "${penalty}" ]; then
${MOCK} batctl hardif "${hardif}" hop_penalty "${penalty}"
fi fi
if [ "${IF_BATMAN_THROUGHPUT_OVERRIDE}" ]; then throughput=$(ifquery -p "batman-throughput-override" "${hardif}")
${MOCK} batctl hardif "${IFACE}" throughput_override "${IF_BATMAN_THROUGHPUT_OVERRIDE}" if [ "${throughput}" ]; then
${MOCK} batctl hardif "${hardif}" throughput_override "${througput}"
fi fi
done
} }
@ -103,9 +108,6 @@ case "${PHASE}" in
if [ "${IF_BATMAN_IFACES}" ]; then if [ "${IF_BATMAN_IFACES}" ]; then
batctl_if add batctl_if add
set_meshif_options set_meshif_options
# B.A.T.M.A.N. adv. underlay interface (hardif)
elif [ "${IF_BATMAN_HOP_PENALTY}" -o "${IF_BATMAN_THROUGHPUT_OVERRIDE}" ]; then
set_hardif_options set_hardif_options
fi fi
;; ;;