From 1da800bfced22626b77bcdf36bf4fc17a504765a Mon Sep 17 00:00:00 2001
From: Fabian Blaese <fabian@blaese.de>
Date: Mon, 3 Dec 2018 20:54:54 +0100
Subject: [PATCH] configurehood: Copy local hoodfile to common location
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Instead of overwriting local variable to local hoodfile location,
copy it to the commonly used location. This makes the local hoodfile
behave exactly like central hoodfiles, which prevents some border cases.

The previous behaviour mainly caused issues when using getJsonPath() and
getUpgradePath() from fff-hoodutils.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
---
 src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
index de60c21d..4ae1364a 100755
--- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
+++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
@@ -77,7 +77,7 @@ if [ -s "$hoodfilewww" ] && isGatewayAvailable ; then
 fi
 
 if [ -s "$hoodfilelocal" ]; then
-	hoodfiletmp="$hoodfilelocal"
+	cp "$hoodfilelocal" "$hoodfiletmp"
 	echo "Use local hood file"
 else
 	# if we have Internet, we download the Hoodfile from the keyxchangev2
-- 
GitLab