Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0067-Use-pigz-for-gzipping-if-available.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0067-Use-pigz-for-gzipping-if-available.patch of Package dracut
From ed3b393b7b7b680e7d66a883b20e8f98cd9c04eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> Date: Thu, 18 Mar 2010 21:41:22 +0200 Subject: [PATCH] Use pigz for gzipping if available. --- dracut | 3 ++- dracut-catimages | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dracut b/dracut index 8c0adad..0ae07f2 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 b19f20a..d49d0e2 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 -- 1.8.3.1