dracut/0010-dracut.sh-don-t-check-gzip-for-rsyncable-if-pigz-is-.patch
Harald Hoyer eeb1c23670 dracut-040-29.git20141204
- git snapshot
2014-12-04 12:31:45 +01:00

30 lines
1.1 KiB
Diff

From 66fd7e43295cb67ac6eaaced3c7b271920e07dce Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 29 Oct 2014 14:18:34 +0100
Subject: [PATCH] dracut.sh: don't check gzip for --rsyncable, if pigz is
available
---
dracut.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index 7aa1264..4590f79 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -822,7 +822,13 @@ case $compress in
bzip2) compress="bzip2 -9";;
lzma) compress="lzma -9 -T0";;
xz) compress="xz --check=crc32 --lzma2=dict=1MiB -T0";;
- gzip) compress="gzip -n -9"; command -v gzip --help 2>&1 | grep -q rsyncable && compress="gzip -n -9 --rsyncable"; command -v pigz > /dev/null 2>&1 && compress="pigz -9 -n -T -R";;
+ gzip) compress="gzip -n -9";
+ if command -v pigz > /dev/null 2>&1; then
+ compress="pigz -9 -n -T -R"
+ elif command -v gzip --help 2>&1 | grep -q rsyncable; then
+ compress="gzip -n -9 --rsyncable"
+ fi
+ ;;
lzo) compress="lzop -9";;
lz4) compress="lz4 -l -9";;
esac