[PATCH] defaultenv/bin/update: fix return values

Marc Kleine-Budde mkl at pengutronix.de
Fri Feb 4 07:45:16 EST 2011


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
  exists with "1".

Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 defaultenv/bin/update |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index 43d3097..7c37c36 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
-- 
1.7.2.3




More information about the barebox mailing list