luci-0.11: merge r9652
authorManuel Munz <freifunk@somakoma.de>
Sun, 27 Jan 2013 00:21:19 +0000 (00:21 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sun, 27 Jan 2013 00:21:19 +0000 (00:21 +0000)
contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting

index 00730b021217caf61085c80c0a41afeaec959a8f..58faa67aa387fff9f522f6edbc36c1f99d4a8e25 100755 (executable)
@@ -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