[PATCH] fff-hoods: Suppress warning for missing sectorfile

Adrian Schmutzler freifunk at adrianschmutzler.de
Sa Nov 4 15:06:03 CET 2017


Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.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 5447d2f..000e3b8 100755
--- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
+++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
@@ -232,7 +232,7 @@ if [ -s "$hoodfile" ]; then
 		# copy the file to webroot so that other mesh routers can download it;
 		# copy only after all other steps so IF can be reentered if something goes wrong
 		cp "$hoodfile" "$hoodfilecopy"
-		cp "$sectortmp" "$sectorcopy"
+		[ -s "$sectortmp" ] && cp "$sectortmp" "$sectorcopy"
 
 	else
 		echo "We have no new file. We do nothing. We try it again in 5 minutes...";
-- 
2.7.4



Mehr Informationen über die Mailingliste franken-dev