]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Use pigz for gzipping if available.
authorVille Skyttä <ville.skytta@iki.fi>
Thu, 18 Mar 2010 19:41:22 +0000 (21:41 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 15 Apr 2010 12:46:48 +0000 (14:46 +0200)
dracut
dracut-catimages

diff --git a/dracut b/dracut
index 8c0adada675c60405a6582dc46926e33520014df..0ae07f2e5748aeb3804957d4a6cd76fcb6354bd6 100755 (executable)
--- 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
index b19f20ae65debab4be8f85d2551bbfc4ed304915..d49d0e2a4b3c66a7577545487df9928a7947237d 100755 (executable)
@@ -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