]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix gzip compress then it not supports rsyncable option
authorVasiliy Tolstov <v.tolstov@selfip.ru>
Mon, 27 Oct 2014 10:42:06 +0000 (13:42 +0300)
committerVasiliy Tolstov <v.tolstov@selfip.ru>
Mon, 27 Oct 2014 10:43:13 +0000 (13:43 +0300)
dracut fail to create initramfs when compressor gzip and
it not have rsyncable option

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
dracut.sh

index 1c7e2083bdcfcfaaf592d2628754cc4b6f516e60..7aa1264cb110c327b66b90fed4dbd7e6c3f1ff48 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -822,7 +822,7 @@ 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 --rsyncable"; command -v pigz > /dev/null 2>&1 && compress="pigz -9 -n -T -R";;
+    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";;
     lzo)   compress="lzop -9";;
     lz4)   compress="lz4 -l -9";;
 esac