From 3fbbcdf2480bc091f44c7b15d875f313ac7ddbed Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 31 Jan 2011 18:35:31 -0600 Subject: Set pipefail before running get_init_cpio This addresses FS#20638, where gen_init_cpio fails, but the pipeline still reports no error because gzip exits successfully. Setting pipefail insures that if anything goes wrong with gen_init_cpio, the operation is deemed a failure and the user isn't unknowingly left with a faulty initcpio. Signed-off-by: Dan McGee --- mkinitcpio | 1 + 1 file changed, 1 insertion(+) (limited to 'mkinitcpio') diff --git a/mkinitcpio b/mkinitcpio index c2565f5..2397776 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -277,6 +277,7 @@ fi status=0 if [ -n "${GENIMG}" ]; then echo -n ":: Generating image '${GENIMG}'..." + shopt -s -o pipefail if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} -9 > "${GENIMG}"; then echo "FAILED" status=1 -- cgit v1.2.3-24-g4f1b