Developing lightweight computation at the DSG edge

Commit 7e4e545a authored by Simó Albert i Beltran's avatar Simó Albert i Beltran
Browse files

Remove initialization of unused variable, references #168.

parent d7ccc90f
......@@ -10,7 +10,7 @@
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -17,7 +20,7 @@
@@ -17,32 +20,13 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
......@@ -19,7 +19,32 @@
#############
@@ -70,11 +73,11 @@ fi
# Variables #
#############
-# bmx6 tunInRemote value.
-if [ -n "$GWCK_MOD_BMX6_TUN_IN_REMOTE" ]
-then
- ipv6calc 2> /dev/null
- if [ $? != 127 ]
- then
- if ! GWCK_MOD_BMX6_TUN_IN_REMOTE="$(ipv6calc -q -I ipv6 -O ipv6 "$GWCK_MOD_BMX6_TUN_IN_REMOTE")"
- then
- log "ERROR: Invalid IPv6 address in GWCK_MOD_BMX6_TUN_IN_REMOTE variable. Using default value."
- fi
- else
- log "WARNING: bmx6 module needs the ipv6calc program to check IPv6 addresses. Please install it."
- fi
-fi
-
-[ -z "$GWCK_MOD_BMX6_TUN_IN_REMOTE" ] \
-&& GWCK_MOD_BMX6_TUN_IN_REMOTE="fd02::1000:ffff"
-
-
# bmx6 tunInNet value.
[ -z "$GWCK_MOD_BMX6_TUN_IN_NET" ] \
&& GWCK_MOD_BMX6_TUN_IN_NET="0.0.0.0/0"
@@ -70,11 +54,11 @@ fi
# Disable offer command.
[ -z "$GWCK_MOD_BMX6_DISABLE_OFFER" ] \
......@@ -33,7 +58,7 @@
# Disable search command.
[ -z "$GWCK_MOD_BMX6_DISABLE_SEARCH" ] \
@@ -96,19 +99,16 @@ gwck_mod_bmx6_this_node_offer()
@@ -96,19 +80,16 @@ gwck_mod_bmx6_this_node_offer()
{
local offer="$(bmx6 -c --parameters | while read key val
do
......@@ -58,3 +83,37 @@
[ -z "$offer" ] && offer="false"
if $offer
then
--- a/etc/gwck/gwck_conf_qmp_ipv4
+++ b/etc/gwck/gwck_conf_qmp_ipv4
@@ -60,14 +60,6 @@ MODULES="specific_routes bmx6"
# Routing table
#GWCK_MOD_SPECIFIC_ROUTES_RT_TABLE="200"
-
-# bmx6 tunInRemote value.
-#GWCK_MOD_BMX6_TUN_IN_REMOTE="fd02::1000:ffff"
-. /etc/qmp/qmp_functions.sh
-local gwck_mod_bmx6_primary_mesh_device="$(uci -q get qmp.interfaces.mesh_devices | awk '{print $1}')"
-local gwck_mod_bmx6_bmx6_mesh_prefix48="$(uci -q get qmp.networks.bmx6_mesh_prefix48)"
-GWCK_MOD_BMX6_TUN_IN_REMOTE="$(qmp_get_ula96 $gwck_mod_bmx6_bmx6_mesh_prefix48:: $gwck_mod_bmx6_primary_mesh_device 2002::ffff )"
-
# bmx6 tunInNet value.
#GWCK_MOD_BMX6_TUN_IN_NET="0.0.0.0/0"
GWCK_MOD_BMX6_TUN_IN_NET="$(uci -q get qmp.tunnels.offer_ipv4_tunnel)"
--- a/etc/gwck/gwck_conf_qmp_ipv6
+++ b/etc/gwck/gwck_conf_qmp_ipv6
@@ -60,14 +60,6 @@ MODULES="specific_routes bmx6"
# Routing table.
#GWCK_MOD_SPECIFIC_ROUTES_RT_TABLE="200"
-
-# bmx6 tunInRemote value.
-#GWCK_MOD_BMX6_TUN_IN_REMOTE="fd02::1000:ffff"
-. /etc/qmp/qmp_functions.sh
-local gwck_mod_bmx6_primary_mesh_device="$(uci -q get qmp.interfaces.mesh_devices | awk '{print $1}')"
-local gwck_mod_bmx6_bmx6_mesh_prefix48="$(uci -q get qmp.networks.bmx6_mesh_prefix48)"
-GWCK_MOD_BMX6_TUN_IN_REMOTE="$(qmp_get_ula96 $gwck_mod_bmx6_bmx6_mesh_prefix48:: $gwck_mod_bmx6_primary_mesh_device 2002::ffff )"
-
# bmx6 tunInNet value.
#GWCK_MOD_BMX6_TUN_IN_NET="0.0.0.0/0"
GWCK_MOD_BMX6_TUN_IN_NET="$(uci -q get qmp.tunnels.offer_ipv6_tunnel || echo "::/0")"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment