From b422e1631eb810685db79dd25fa64e57a0917f25 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Tue, 26 Mar 2019 19:35:55 +0200 Subject: [PATCH] scripts/gen_image_generic.sh: fail on errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-by: Petr Å tetiar Signed-off-by: Stijn Tintel --- scripts/gen_image_generic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 []" exit 1 -- 2.30.2