contrib/meshwizard: add ipv6only option to txtinfo/jsoninfo plugin config
authorManuel Munz <munz@comuno.net>
Sat, 30 May 2015 20:02:05 +0000 (22:02 +0200)
committerManuel Munz <munz@comuno.net>
Sat, 30 May 2015 20:02:05 +0000 (22:02 +0200)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh

index f51b75e6ac3279fe25e0d4efee9d6f77cafd2113..d212ca4722fc8f5140a901a0a6488f48d87c15cf 100755 (executable)
@@ -115,18 +115,29 @@ setup_watchdog() {
 }
 
 setup_jsoninfo() {
-       # Setup jsoninfo
        proto="$1"
        uci batch <<- EOF
                set $cfg.olsrd_jsoninfo=LoadPlugin
                set $cfg.olsrd_jsoninfo.library="olsrd_jsoninfo.so.0.0"
        EOF
        if [ "$proto" = "6" ]; then
-               uci set $cfg.olsrd_jsoninfo.port='9091'
+               uci set $cfg.olsrd_jsoninfo.ipv6only='1'
        fi
        uci_commitverbose "Setup olsr jsoninfo plugin" $cfg
 }
 
+setup_txtinfo() {
+       proto="$1"
+       uci batch <<- EOF
+           set $cfg.olsrd_txtinfo=LoadPlugin
+           set $cfg.olsrd_txtinfo.library="olsrd_txtinfo.so.0.1"
+       EOF
+       if [ "$proto" = "6" ]; then
+               uci set $cfg.olsrd_txtinfo.ipv6only='1'
+       fi
+       uci_commitverbose "Setup olsr txtinfo plugin" $cfg
+} 
+
 
 for proto in $protocols; do
     cfg="olsrd"
@@ -145,5 +156,5 @@ for proto in $protocols; do
     setup_dyngw_plain
     setup_watchdog
     setup_jsoninfo $proto
-
+    setup_txtinfo $proto
 done