aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2019-03-26 19:35:55 +0200
committerStijn Tintel <stijn@linux-ipv6.be>2019-03-27 00:13:30 +0200
commitb422e1631eb810685db79dd25fa64e57a0917f25 (patch)
treebe8e1c95963c6e70becce824c020986495238cb9 /scripts
parente1444ab59cfcd330cfac6f51aa14106961585ee1 (diff)
downloadupstream-b422e1631eb810685db79dd25fa64e57a0917f25.tar.gz
upstream-b422e1631eb810685db79dd25fa64e57a0917f25.tar.bz2
upstream-b422e1631eb810685db79dd25fa64e57a0917f25.zip
scripts/gen_image_generic.sh: fail on errors
The script always exits with value 0, even if some of the commands fail. This can potentially create broken, unbootable images, e.g. when make_ext4fs fails due to TARGET_KERNEL_PARTSIZE being too small for the kernel. Avoid this by failing the script when any command fails. Acked-by: Jo-Philipp Wich <jo@mein.io> Acked-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_image_generic.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 206ba7f3fa..d9beeb0295 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright (C) 2006-2012 OpenWrt.org
-set -x
+set -e -x
[ $# == 5 -o $# == 6 ] || {
echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
exit 1