autoupdater: fix usage of set -e

This commit is contained in:
Jan-Philipp Litza 2014-01-11 18:00:17 +01:00
parent ec5b2adbf1
commit 0d01eb472a
1 changed files with 1 additions and 2 deletions

View File

@ -13,8 +13,7 @@ BRANCH=$(uci get autoupdater.settings.branch)
PROBABILITY=$(uci get autoupdater.${BRANCH}.probability)
if test "a$1" != "a-f"; then
echo | awk "END{srand();exit rand() > $PROBABILITY}"
if test $? -ne 0; then
if ! echo | awk "END{srand();exit rand() > $PROBABILITY}"; then
echo "No autoupdate this time. Use -f to override"
exit 0
fi