From c04b5b8b25124273d04ba0fe1f33e28094c42f38 Mon Sep 17 00:00:00 2001 From: Alexander <7adietri@users.noreply.github.com> Date: Sun, 19 Apr 2020 16:26:14 +0200 Subject: [PATCH] Add hop_penalty.sh --- hop_penalty.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 hop_penalty.sh diff --git a/hop_penalty.sh b/hop_penalty.sh new file mode 100644 index 0000000..5d67506 --- /dev/null +++ b/hop_penalty.sh @@ -0,0 +1,9 @@ +# No uci support for hop penalty after Gluon v2019.1.2 +INTERFACE="bat0" +PENALTY="5" +CURRENT=$(cat /sys/class/net/$INTERFACE/mesh/hop_penalty) +if [ "$PENALTY" != "$CURRENT" ]; then + echo $PENALTY > /sys/class/net/$INTERFACE/mesh/hop_penalty + uci set batman-adv.$INTERFACE.hop_penalty=$PENALTY + uci commit batman-adv +fi