Just test the status of the cpio-and-compress pipe directly.
parent
5b158ad3a9
commit
937f678ef6
4
dracut
4
dracut
|
|
@ -340,8 +340,8 @@ type hardlink &>/dev/null && {
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ $compress = gzip* ]] && type pigz > /dev/null 2>&1 && compress="pigz -9"
|
[[ $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 ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet | \
|
||||||
if [ $? -ne 0 ]; then
|
$compress > "$outfile"; ); then
|
||||||
derror "dracut: creation of $outfile failed"
|
derror "dracut: creation of $outfile failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue