From 59357250c5e7bbe4cc0d2b670f6728ac8318b4c7 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 17 Oct 2014 15:23:09 +0200 Subject: [PATCH] dracut: prefer lz4 compression by default. --- srcpkgs/dracut/files/kernel-hook-postinst | 9 ++++++++- srcpkgs/dracut/template | 5 ++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/srcpkgs/dracut/files/kernel-hook-postinst b/srcpkgs/dracut/files/kernel-hook-postinst index 2dd8c74c12..c82b4729bb 100644 --- a/srcpkgs/dracut/files/kernel-hook-postinst +++ b/srcpkgs/dracut/files/kernel-hook-postinst @@ -11,5 +11,12 @@ if [ ! -x usr/bin/dracut ]; then exit 0 fi -dracut -q --force boot/initramfs-${VERSION}.img ${VERSION} +if [ -x /bin/lz4 ]; then + args="--lz4" +elif [ -x /bin/xz ]; then + args="--xz" +elif [ -x /bin/bzip2 ]; then + args="--bzip2" +fi +dracut -q --force $args boot/initramfs-${VERSION}.img ${VERSION} exit $? diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 443c2bcddd..9ef532d5c1 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -1,11 +1,10 @@ # Template file for 'dracut' pkgname=dracut version=038 -revision=1 +revision=2 build_style=meta hostmakedepends="libxslt docbook-xsl asciidoc" -makedepends="psmisc cpio xz" -depends="${makedepends}" +depends="psmisc cpio lz4" conf_files="/etc/dracut.conf" make_dirs=" /etc/dracut.conf.d 0755 root root