summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-02-01 01:35:31 +0100
committerThomas Bächler <thomas@archlinux.org>2011-02-01 01:37:19 +0100
commit3fbbcdf2480bc091f44c7b15d875f313ac7ddbed (patch)
tree4c32bec827b1e91cd8a5c1c81d5e1f5f58794030 /mkinitcpio
parent0f53f8ead0e5f22744882b5452db1664716d466c (diff)
downloadmkinitcpio-3fbbcdf2480bc091f44c7b15d875f313ac7ddbed.tar.gz
mkinitcpio-3fbbcdf2480bc091f44c7b15d875f313ac7ddbed.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio1
1 files changed, 1 insertions, 0 deletions
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