From: Harald Hoyer Date: Mon, 2 Aug 2010 07:39:13 +0000 (+0200) Subject: dracut: use hardlink, if available to safe some space X-Git-Tag: 007~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6292ee9d187cd85bc2d5ee32bd934368bca88b42;p=thirdparty%2Fdracut.git dracut: use hardlink, if available to safe some space --- diff --git a/dracut b/dracut index aea478bc7..ee7b2f3c2 100755 --- a/dracut +++ b/dracut @@ -312,6 +312,10 @@ if [[ $do_strip = yes ]] ; then done fi +type hardlink &>/dev/null && { + hardlink "$initdir" 2>&1 +} + 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