diff options
| author | Stijn Tintel <stijn@linux-ipv6.be> | 2019-03-26 19:35:55 +0200 |
|---|---|---|
| committer | Stijn Tintel <stijn@linux-ipv6.be> | 2019-03-27 00:13:30 +0200 |
| commit | b422e1631eb810685db79dd25fa64e57a0917f25 (patch) | |
| tree | be8e1c95963c6e70becce824c020986495238cb9 /scripts | |
| parent | e1444ab59cfcd330cfac6f51aa14106961585ee1 (diff) | |
| download | upstream-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-x | scripts/gen_image_generic.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh index 206ba7f3fa5..d9beeb02953 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 |
