summaryrefslogtreecommitdiffstats
path: root/defaultenv/bin/update
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2011-02-04 13:50:49 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-02-07 22:10:28 +0100
commitc5dd4c4d0a6a6c6f59a4ab03869a34d568450935 (patch)
treeb4e68defd15931ebd45fc1ab67321341c395cbb7 /defaultenv/bin/update
parentf5660396eb902d1c1a2a928c1cfbbd261dd55475 (diff)
downloadbarebox-c5dd4c4d0a6a6c6f59a4ab03869a34d568450935.tar.gz
barebox-c5dd4c4d0a6a6c6f59a4ab03869a34d568450935.tar.xz
defaultenv/bin/update: fix return values
This patch fixes the return values of the update script. - Exit with an error of the "_update" script fails. - Add a "else; true" to the crc check, otherwise the script exits with "1". Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv/bin/update')
-rw-r--r--defaultenv/bin/update4
1 files changed, 3 insertions, 1 deletions
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index 43d30977d8..7c37c36904 100644
--- a/defaultenv/bin/update
+++ b/defaultenv/bin/update
@@ -64,7 +64,9 @@ if [ x${mode} != xtftp ] && [ x${mode} != xxmodem ] ; then
exit 1
fi
-. /env/bin/_update
+. /env/bin/_update || exit 1
if [ x${check} = xy ]; then
crc32 -f $image -F $part
+else
+ true
fi