From: Victor Lowther Date: Sat, 14 Aug 2010 19:23:25 +0000 (-0500) Subject: Just test the status of the cpio-and-compress pipe directly. X-Git-Tag: 008~160 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=937f678ef648f2a883f0b61ac66b863f3389031c;p=thirdparty%2Fdracut.git Just test the status of the cpio-and-compress pipe directly. --- diff --git a/dracut b/dracut index 5c1c4b48b..1242f42cf 100755 --- a/dracut +++ b/dracut @@ -340,8 +340,8 @@ type hardlink &>/dev/null && { } [[ $compress = gzip* ]] && type pigz > /dev/null 2>&1 && compress="pigz -9" -( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet |$compress > "$outfile"; ) -if [ $? -ne 0 ]; then +if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet | \ + $compress > "$outfile"; ); then derror "dracut: creation of $outfile failed" exit 1 fi