include $(TOPDIR)/rules.mk
PKG_NAME:=meshwizard
-PKG_RELEASE:=0.3.1
+PKG_RELEASE:=0.3.2
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
#!/bin/sh
netrenamed=$1
-local PREFIX="$(echo $ipv6_prefix| cut -d "/" -f 1| sed 's/::/:/')"
+PREFIX="$(echo $ipv6_prefix| cut -d "/" -f 1| sed 's/::/:/')"
# Get the devices mac address
-local device="$(uci -p/var/state -q get network.$1.ifname)"
+device="$(uci -p/var/state -q get network.$1.ifname)"
if [ -n "$device" ]; then
- local MAC="$(ifconfig $netrenamed |grep HWaddr | awk '{ print $5 '})"
+ MAC="$(ifconfig $netrenamed |grep HWaddr | awk '{ print $5 '})"
else
- local MAC="$(cat /sys/class/net/$1/address)"
- local IPV6_UNIQ="$(echo $MAC | awk -F: '{ print $1$2":"$3$4":"$5$6 }')"
+ MAC="$(cat /sys/class/net/$1/address)"
+ IPV6_UNIQ="$(echo $MAC | awk -F: '{ print $1$2":"$3$4":"$5$6 }')"
fi
echo "${PREFIX}${IPV6_UNIQ}:1"
# Setup IPv6 for the lan interface
-local ip6addr=""
+ip6addr=""
if [ "$ipv6_config" = "auto-ipv6-dhcpv6" ]; then
# get lan mac
- local device="$(uci -p/var/state -q get network.lan.ifname)"
+ device="$(uci -p/var/state -q get network.lan.ifname)"
if [ -n "device" ]; then
ip6addr="$($dir/helpers/gen_auto-ipv6-dhcpv6-ip.sh $device)"
fi
fi
# Setup IPv6 for the interface
-local ip6addr
if [ "$ipv6_enabled" = 1 ]; then
if [ "$ipv6_config" = "auto-ipv6-dhcpv6" ]; then
ip6addr="$($dir/helpers/gen_auto-ipv6-dhcpv6-ip.sh $netrenamed)"
if [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ]; then
# VAPs are enabled for this interface, supported and we want to
# also use DHCP on the adhoc interface
- local network
- local mask
network=${dhcprange%%/*}
mask=${dhcprange##*/}
# Divide network size by adding 1 to the netmask
. /lib/functions.sh
. $dir/functions.sh
-local protocols="4"
+protocols="4"
if [ "$ipv6_enabled" = 1 ] && [ "$has_ipv6" == "1" ]; then
protocols="4 6"
fi
. /lib/functions.sh
. $dir/functions.sh
-local protocols="4"
+protocols="4"
if [ "$ipv6_enabled" = 1 ] && [ "$has_ipv6" == "1" ]; then
protocols="4 6"
fi
# Set Hna entry for ipv6 net for static ipv6 config
uci -q delete $cfg.${netrenamed}static
if [ "$ipv6_config" = "static" ]; then
- local v6range="$(uci -q get meshwizard.netconfig.$net\_ip6addr)"
- local v6net="$(echo $v6range | cut -d '/' -f 1)"
- local v6mask="$(echo $v6range | cut -d '/' -f 2)"
+ v6range="$(uci -q get meshwizard.netconfig.$net\_ip6addr)"
+ v6net="$(echo $v6range | cut -d '/' -f 1)"
+ v6mask="$(echo $v6range | cut -d '/' -f 2)"
if [ -n "$v6net" ] && [ -n "$v6mask" ]; then
uci set $cfg.${netrenamed}static="Hna6"
uci set $cfg.${netrenamed}static.netaddr="$v6net"
export community="$community"
# we need a list of widgets later on. It will be populated in read_defaults.sh
-local widgets=""
+widgets=""
# Get a list of networks we need to setup
networks=$(uci show meshwizard.netconfig | grep -v "netconfig=" | sed -e 's/meshwizard.netconfig\.\(.*\)\_.*/\1/' |sort|uniq)