diff options
author | Manuel Munz <freifunk@somakoma.de> | 2012-08-13 19:29:56 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2012-08-13 19:29:56 +0000 |
commit | d7f865b6b2d6fa791bcf8508773fe69d91584901 (patch) | |
tree | 56502af962bc3b5d29ade07bd5203a1bf40cee43 /contrib/package/meshwizard/files | |
parent | 4b0b9841de379c6987e914dfd10c93ced11c4398 (diff) |
meshwizard: setup static ipv6 addresses
Diffstat (limited to 'contrib/package/meshwizard/files')
-rwxr-xr-x | contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh index e62cb5aa14..8c909e2d5f 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh @@ -7,7 +7,8 @@ net="$1" # Setup a (new) interface section for $net -ipaddr=$(uci get meshwizard.netconfig.$net\_ip4addr) +ipaddr=$(uci -q get meshwizard.netconfig.$net\_ip4addr) +ip6addr=$(uci -q get meshwizard.netconfig.$net\_ip6addr) [ -z "$ipaddr" ] && msg_missing_value meshwizard $net\_ip4addr netmask=$(uci -q get meshwizard.netconfig.$net\_netmask) @@ -30,6 +31,9 @@ if [ "$profile_ipv6" = 1 ]; then ip6addr="$($dir/helpers/gen_auto-ipv6-dhcpv6-ip.sh $netrenamed)" uci set network.$netrenamed.ip6addr="${ip6addr}/112" fi + if [ "$profile_ipv6_config" = "static" ] && [ -n "$ip6addr" ]; then + uci set network.$netrenamed.ip6addr="$ip6addr" + fi fi uci_commitverbose "Setup interface $netrenamed" network |