Use pigz for gzipping if available.

This commit is contained in:
Ville Skyttä 2010-03-18 21:41:22 +02:00 committed by Harald Hoyer
parent fede5bbcda
commit c91570782c
2 changed files with 4 additions and 2 deletions

3
dracut
View File

@ -303,7 +303,8 @@ if [[ $do_strip = yes ]] ; then
done
fi
( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet |gzip -9 > "$outfile"; )
type pigz &>/dev/null && gzip=pigz || gzip=gzip
( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet |$gzip -9 > "$outfile"; )
if [ $? -ne 0 ]; then
derror "dracut: creation of $outfile failed"
exit 1

View File

@ -102,7 +102,8 @@ fi
if [[ ! $no_overlay ]]; then
ofile="$imagedir/90-overlay.img"
dinfo "Creating image $ofile from directory $overlay"
( cd "$overlay"; find . |cpio --quiet -H newc -o |gzip -9 > "$ofile"; )
type pigz &>/dev/null && gzip=pigz || gzip=gzip
( cd "$overlay"; find . |cpio --quiet -H newc -o |$gzip -9 > "$ofile"; )
fi
if [[ ! $no_imagedir ]]; then