contrib/freifunk-policyrouting: Only disable olsrd_dyngw_plain plugin if it uses the main routing table

This commit is contained in:
Manuel Munz 2013-10-05 18:13:23 +00:00
parent 2595726dfb
commit 78c36816b0
2 changed files with 6 additions and 3 deletions

View file

@ -4,7 +4,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=freifunk-policyrouting
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

View file

@ -53,9 +53,12 @@ disable_dyngw() {
dyngwplainlib=`uci show olsrd |grep dyn_gw_plain |awk {' FS="."; print $1"."$2 '}`
if [ -n "$dyngwplainlib" ]; then
rttable="$(uci -q get $dyngwplainlib.RtTable)"
if [ -z "$rttable" ] || [ "$rttable" = "254" ]; then
uci set $dyngwplainlib.ignore=1
uci commit olsrd
fi
fi
}
restart_services() {