contrib/freifunk-policyrouting: make sure olsr routing table entries are removed on boot when policy routing is disabled and wan is not connected and therefore there is no hotplug event fired

This commit is contained in:
Manuel Munz 2012-02-24 21:08:18 +00:00
parent 0453e50932
commit 7e9d0c3c92
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/bin/sh /etc/rc.common
START=60
boot()
{
prenabled=$(uci get freifunk-policyrouting.pr.enable)
if [ ! "$prenabled" = "1" ]; then
uci -q delete olsrd.@olsrd[0].RtTable
uci -q delete olsrd.@olsrd[0].RtTableDefault
uci commit olsrd
fi
}

View file

@ -0,0 +1 @@
../init.d/freifunk-policyrouting