contrib/meshwizard: Cleanup olsrd config (Remove httpinfo and wlan interface
authorManuel Munz <freifunk@somakoma.de>
Sun, 3 Jun 2012 09:05:13 +0000 (09:05 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sun, 3 Jun 2012 09:05:13 +0000 (09:05 +0000)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh

index 29258694dc66b82c8c82f6b6415b7595eb90ba0b..11ea3f17f8d0deefb119c2e52eb7bc1bed29b3dd 100755 (executable)
@@ -4,6 +4,17 @@
 . /etc/functions.sh
 . $dir/functions.sh
 
+# Clean the config, remove httpinfo and interface wlan
+uci -q delete olsrd.olsrd_httpinfo
+handle_interface() {
+        config_get interface "$1" interface
+        if [ "$interface" = "wlan" ]; then
+               uci delete olsrd.$1
+        fi
+}
+config_foreach handle_interface Interface
+uci_commitverbose "Cleanup olsrd config" olsrd
+
 #Rename olsrd basic settings
 handle_olsrd() {
        if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then