Message ID | 20171105100335.5270-1-fabian@blaese.de |
---|---|
State | Accepted |
Headers | show |
diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index ba34329..7bb976e 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -144,8 +144,8 @@ if [ -s "$hoodfile" ]; then json_get_var mesh_type5 mesh_type5 fi - catnew="$(cat "$hoodfile" | sed 's/"timestamp":"[0-9]*"/"timestamp":0/')" - catold="$(cat "$hoodfilecopy" 2>/dev/null | sed 's/"timestamp":"[0-9]*"/"timestamp":0/')" + catnew="$(cat "$hoodfile" | sed 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" + catold="$(cat "$hoodfilecopy" 2>/dev/null | sed 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" sumnew=$(echo "$catnew" | sha256sum | cut -f1 -d " ") sumold=$(echo "$catold" | sha256sum | cut -f1 -d " ")
Hi Reviewed-by: Tim Niemeyer <tim@tn-x.org> Tim Am Sonntag, den 05.11.2017, 11:03 +0100 schrieb Fabian Bläse: > Some JSON beautifiers put spaces between identifier and value. > This is necessary to tolerate that. > > Signed-off-by: Fabian Bläse <fabian@blaese.de> > --- > 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 ba34329..7bb976e 100755 > --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood > +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood > @@ -144,8 +144,8 @@ if [ -s "$hoodfile" ]; then > json_get_var mesh_type5 mesh_type5 > fi > > - catnew="$(cat "$hoodfile" | sed 's/"timestamp":"[0- > 9]*"/"timestamp":0/')" > - catold="$(cat "$hoodfilecopy" 2>/dev/null | sed > 's/"timestamp":"[0-9]*"/"timestamp":0/')" > + catnew="$(cat "$hoodfile" | sed 's/"timestamp”: *"[0- > 9]*"/"timestamp":0/')" > + catold="$(cat "$hoodfilecopy" 2>/dev/null | sed > 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" > sumnew=$(echo "$catnew" | sha256sum | cut -f1 -d " ") > sumold=$(echo "$catold" | sha256sum | cut -f1 -d " ") > > -- > 2.14.2 >
Hi Und applied. Tim Am Sonntag, den 05.11.2017, 13:38 +0100 schrieb Tim Niemeyer: > Hi > > Reviewed-by: Tim Niemeyer <tim@tn-x.org> > > Tim > > Am Sonntag, den 05.11.2017, 11:03 +0100 schrieb Fabian Bläse: > > Some JSON beautifiers put spaces between identifier and value. > > This is necessary to tolerate that. > > > > Signed-off-by: Fabian Bläse <fabian@blaese.de> > > --- > > 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 ba34329..7bb976e 100755 > > --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood > > +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood > > @@ -144,8 +144,8 @@ if [ -s "$hoodfile" ]; then > > json_get_var mesh_type5 mesh_type5 > > fi > > > > - catnew="$(cat "$hoodfile" | sed 's/"timestamp":"[0- > > 9]*"/"timestamp":0/')" > > - catold="$(cat "$hoodfilecopy" 2>/dev/null | sed > > 's/"timestamp":"[0-9]*"/"timestamp":0/')" > > + catnew="$(cat "$hoodfile" | sed 's/"timestamp”: *"[0- > > 9]*"/"timestamp":0/')" > > + catold="$(cat "$hoodfilecopy" 2>/dev/null | sed > > 's/"timestamp”: *"[0-9]*"/"timestamp":0/')" > > sumnew=$(echo "$catnew" | sha256sum | cut -f1 -d " ") > > sumold=$(echo "$catold" | sha256sum | cut -f1 -d " ") > > > > -- > > 2.14.2 > > > -- franken-dev mailing list franken-dev@freifunk.net http://lists.freifunk.net/mailman/listinfo/franken-dev-freifunk.net
Some JSON beautifiers put spaces between identifier and value. This is necessary to tolerate that. Signed-off-by: Fabian Bläse <fabian@blaese.de> --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)