Message ID | 1509804363-2104-1-git-send-email-freifunk@adrianschmutzler.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 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...";
Hi Reviewed-by: Tim Niemeyer <tim@tn-x.org> Tim Am Samstag, den 04.11.2017, 15:06 +0100 schrieb Adrian Schmutzler: > Signed-off-by: Adrian Schmutzler <freifunk@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 >
Hi Und applied. Tim Am Samstag, den 04.11.2017, 15:33 +0100 schrieb Tim Niemeyer: > Hi > > Reviewed-by: Tim Niemeyer <tim@tn-x.org> > > Tim > > Am Samstag, den 04.11.2017, 15:06 +0100 schrieb Adrian Schmutzler: > > Signed-off-by: Adrian Schmutzler <freifunk@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
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)