From patchwork Sun Oct 15 21:35:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: fff-hoods: fix sed to substitute timestamp From: Robert Langhammer X-Patchwork-Id: 597 Message-Id: <20171015213525.5843-1-rlanghammer@web.de> To: franken-dev@freifunk.net Date: Sun, 15 Oct 2017 23:35:25 +0200 Signed-off-by: Robert Langhammer Reviewed-by: Tim Niemeyer Reviewed-by: Adrian Schmutzler Reviewed-by: Fabian Bläse Tested-by: Fabian Bläse --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 31b3e4b..d41053a 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -106,8 +106,8 @@ if [ -s /tmp/keyxchangev2data ]; then # https://pw.freifunk-franken.de/patch/205/ # but without signature, every hood file we get is valid! - catnew="$(cat /tmp/keyxchangev2data | sed 's/"timestamp":[0-9]*/"timestamp":0/')" - catold="$(cat /www/public/keyxchangev2data 2>/dev/null | sed 's/"timestamp":[0-9]*/"timestamp":0/')" + catnew="$(cat /tmp/keyxchangev2data | sed 's/"timestamp":"[0-9]*"/"timestamp":0/')" + catold="$(cat /www/public/keyxchangev2data 2>/dev/null | sed 's/"timestamp":"[0-9]*"/"timestamp":0/')" sumnew=$(echo "$catnew" | sha256sum | cut -f1 -d " ") sumold=$(echo "$catold" | sha256sum | cut -f1 -d " ")