luci-0.10: Merge r8322
authorManuel Munz <freifunk@somakoma.de>
Fri, 24 Feb 2012 21:09:49 +0000 (21:09 +0000)
committerManuel Munz <freifunk@somakoma.de>
Fri, 24 Feb 2012 21:09:49 +0000 (21:09 +0000)
contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting [new file with mode: 0755]
contrib/package/freifunk-policyrouting/files/etc/rc.d/S60-freifunk-policyrouting [new symlink]

diff --git a/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting
new file mode 100755 (executable)
index 0000000..00730b0
--- /dev/null
@@ -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
+}
diff --git a/contrib/package/freifunk-policyrouting/files/etc/rc.d/S60-freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/rc.d/S60-freifunk-policyrouting
new file mode 120000 (symlink)
index 0000000..3c3dad8
--- /dev/null
@@ -0,0 +1 @@
+../init.d/freifunk-policyrouting
\ No newline at end of file