Skip to content
Snippets Groups Projects
Commit f986d590 authored by Adrian Schmutzler's avatar Adrian Schmutzler Committed by Tim Niemeyer
Browse files

configurehood: Don't remove timestamp for checksum comparison


Timestamps in hood file currently only change if changes are
made. Thus, there is no reason to remove them for comparison.

This also fixes the wrong quote characters in the script, which
changed the script in a way the timestamps aren't removed right
now anyway.

After this change, a hood reconfiguration may be triggered by
just changing the timestamp at the keyxchange.

Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: default avatarTim Niemeyer <tim@tn-x.org>
Reviewed-by: default avatarFabian Bläse <fabian@blaese.de>
Reviewed-by: default avatarRobert Langhammer <rlanghammer@web.de>
Tested-by: default avatarFabian Bläse <fabian@blaese.de>
Reviewed-by: default avatarTim Niemeyer <tim@tn-x.org>
parent 4a266c83
No related branches found
No related tags found
No related merge requests found
...@@ -106,10 +106,8 @@ if [ -s "$hoodfiletmp" ]; then ...@@ -106,10 +106,8 @@ if [ -s "$hoodfiletmp" ]; then
# https://pw.freifunk-franken.de/patch/205/ # https://pw.freifunk-franken.de/patch/205/
# but without signature, every hood file we get is valid! # but without signature, every hood file we get is valid!
catnew="$(cat "$hoodfiletmp" | sed 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" sumnew=$(cat "$hoodfiletmp" 2>/dev/null | sha256sum | cut -f1 -d " ")
catold="$(cat "$hoodfileref" 2>/dev/null | sed 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" sumold=$(cat "$hoodfileref" 2>/dev/null | sha256sum | cut -f1 -d " ")
sumnew=$(echo "$catnew" | sha256sum | cut -f1 -d " ")
sumold=$(echo "$catold" | sha256sum | cut -f1 -d " ")
json_load "$(cat "$hoodfiletmp")" json_load "$(cat "$hoodfiletmp")"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment