From 78c36816b0267f0422586fa9e2aba155a45afeb1 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Sat, 5 Oct 2013 18:13:23 +0000 Subject: [PATCH] contrib/freifunk-policyrouting: Only disable olsrd_dyngw_plain plugin if it uses the main routing table --- contrib/package/freifunk-policyrouting/Makefile | 2 +- .../files/etc/init.d/freifunk-policyrouting | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/package/freifunk-policyrouting/Makefile b/contrib/package/freifunk-policyrouting/Makefile index 22fdc59cb4..a9301cef31 100644 --- a/contrib/package/freifunk-policyrouting/Makefile +++ b/contrib/package/freifunk-policyrouting/Makefile @@ -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) diff --git a/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting index b3720e60ac..10cb4454d5 100755 --- a/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting +++ b/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting @@ -53,8 +53,11 @@ disable_dyngw() { dyngwplainlib=`uci show olsrd |grep dyn_gw_plain |awk {' FS="."; print $1"."$2 '}` if [ -n "$dyngwplainlib" ]; then - uci set $dyngwplainlib.ignore=1 - uci commit olsrd + rttable="$(uci -q get $dyngwplainlib.RtTable)" + if [ -z "$rttable" ] || [ "$rttable" = "254" ]; then + uci set $dyngwplainlib.ignore=1 + uci commit olsrd + fi fi } -- 2.30.2