contrib/freifunk-policyrouting: Only disable olsrd_dyngw_plain plugin if it uses...
authorManuel Munz <freifunk@somakoma.de>
Sat, 5 Oct 2013 18:13:23 +0000 (18:13 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sat, 5 Oct 2013 18:13:23 +0000 (18:13 +0000)
contrib/package/freifunk-policyrouting/Makefile
contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting

index 22fdc59cb42e12e845649fed048c4fbd0d466d21..a9301cef31e96b6ae9004b99a273ad215433f3c9 100644 (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)
 
index b3720e60ac208457c92fc402005b8a19286d3969..10cb4454d538b554abb9303d1cd0117222a4f482 100755 (executable)
@@ -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
 }