contrib/meshwizard: IPv6 fixes
authorManuel Munz <freifunk@somakoma.de>
Thu, 2 Aug 2012 14:41:30 +0000 (14:41 +0000)
committerManuel Munz <freifunk@somakoma.de>
Thu, 2 Aug 2012 14:41:30 +0000 (14:41 +0000)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh [new file with mode: 0755]
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh

diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh
new file mode 100755 (executable)
index 0000000..adf3429
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+net=$1
+. $dir/functions.sh
+
+ra="$(uci -q get meshwizard.netconfig.${net}_ipv6ra)"
+uci set autoipv6.${netrenamed}="interface"
+if [ -n "$ra" ]; then
+       uci set autoipv6.${netrenamed}.ra=1
+fi
+
+uci_commitverbose "Setup auto-ipv6 for interface $netrenamed" autoipv6
index edbbbc418eb47b1ec6a4290385281f9aa1c5173b..d44600b78577037faba5389103380209b7deea85 100755 (executable)
@@ -2,12 +2,12 @@
 
 . $dir/functions.sh
 
-# Setup auto-ipv6
-
-if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
-       uci set autoipv6.olsr_node.enable=1
-       uci_commitverbose "Setup auto-ipv6 for dhcpv6 mode" autoipv6
+if [ "$general_ipv6_config" = "auto-ipv6-fromv4" ]; then
+       mode="fromv4"
+else
+       mode="random"
 fi
 
-       
-
+uci set autoipv6.olsr_node.enabled=1
+uci set autoipv6.olsr_node.mode="$mode"
+uci_commitverbose "Setup auto-ipv6" autoipv6