]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Just test the status of the cpio-and-compress pipe directly.
authorVictor Lowther <victor.lowther@gmail.com>
Sat, 14 Aug 2010 19:23:25 +0000 (14:23 -0500)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Aug 2010 09:51:34 +0000 (11:51 +0200)
dracut

diff --git a/dracut b/dracut
index 5c1c4b48b8d43ec329bae657f25f395a3de428b2..1242f42cfa1430b4e9401f914a1e50071ed1a9f1 100755 (executable)
--- 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