summaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2012-08-02 14:41:30 +0000
committerManuel Munz <freifunk@somakoma.de>2012-08-02 14:41:30 +0000
commit71d4bb6f46eb55ff77cc0df734f2c649e1d795bd (patch)
treeab241aeb841f4a869e4b52ef9328c275685694b6 /contrib
parentd21dc5cfa6e7f6c1893967c87521b448698f6e73 (diff)
contrib/meshwizard: IPv6 fixes
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh12
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh14
2 files changed, 19 insertions, 7 deletions
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
index 000000000..adf342913
--- /dev/null
+++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh
@@ -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
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh
index edbbbc418..d44600b78 100755
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh
+++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh
@@ -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