batman-adv: use batctl for configuration of hop_penalty
hop_penalty is the last remaining setting which is directly writing to sysfs instead of using a implementation (sysfs vs. netlink) abstraction layer. batctl now provides a wrapper function that allows the script to directly use it to take care of communicating with the driver. Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
278e98cb86
commit
5882b6049d
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_NAME:=batman-adv
|
||||
|
||||
PKG_VERSION:=2019.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_HASH:=3e97d8a771cdbd7b2df42c52b88e071eaa58b5d28eb4e17a4b13b6698debbdc0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
|
|
@ -60,8 +60,7 @@ bat_config()
|
|||
;;
|
||||
esac
|
||||
|
||||
[ -n "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty
|
||||
|
||||
[ -n "$hop_penalty" ] && batctl -m "$mesh" hop_penalty "$hop_penalty"
|
||||
[ -n "$isolation_mark" ] && batctl -m "$mesh" isolation_mark "$isolation_mark"
|
||||
[ -n "$multicast_mode" ] && batctl -m "$mesh" multicast_mode "$multicast_mode" 2>&-
|
||||
[ -n "$network_coding" ] && batctl -m "$mesh" network_coding "$network_coding" 2>&-
|
||||
|
|
Loading…
Reference in New Issue