From: Manuel Munz Date: Sun, 27 Jan 2013 00:17:48 +0000 (+0000) Subject: contrib/freifunkpolicyrouting: Also remove olsrd rttables when the wan interface... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5f76dada3c0eb1e949ca3b2cf2adacaab25028eb;p=project%2Fluci.git contrib/freifunkpolicyrouting: Also remove olsrd rttables when the wan interface is not up at boot --- 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 00730b0212..58faa67aa3 100755 --- a/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting +++ b/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting @@ -1,11 +1,11 @@ #!/bin/sh /etc/rc.common START=60 - +. /lib/functions/network.sh boot() { prenabled=$(uci get freifunk-policyrouting.pr.enable) - if [ ! "$prenabled" = "1" ]; then + if [ ! "$prenabled" = "1" ] || ! network_is_up wan; then uci -q delete olsrd.@olsrd[0].RtTable uci -q delete olsrd.@olsrd[0].RtTableDefault uci commit olsrd