]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: use hardlink, if available to safe some space
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Aug 2010 07:39:13 +0000 (09:39 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Aug 2010 07:39:13 +0000 (09:39 +0200)
dracut

diff --git a/dracut b/dracut
index aea478bc784b319cd528f6e3dd223370df62e5b6..ee7b2f3c2d90a66ea1724bd322adb5959198975f 100755 (executable)
--- 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