From: Ville Skyttä Date: Thu, 18 Mar 2010 19:41:22 +0000 (+0200) Subject: Use pigz for gzipping if available. X-Git-Tag: 006~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c91570782c2aa9128f204a21e5d2b516658febae;p=thirdparty%2Fdracut.git Use pigz for gzipping if available. --- diff --git a/dracut b/dracut index 8c0adada6..0ae07f2e5 100755 --- a/dracut +++ b/dracut @@ -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 diff --git a/dracut-catimages b/dracut-catimages index b19f20ae6..d49d0e2a4 100755 --- a/dracut-catimages +++ b/dracut-catimages @@ -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