]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: cp with sparse
authorHarald Hoyer <harald@redhat.com>
Fri, 2 Sep 2011 07:01:47 +0000 (09:01 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 2 Sep 2011 17:19:40 +0000 (19:19 +0200)
dracut
dracut-functions

diff --git a/dracut b/dracut
index fd36805b73df0ef368b04f9e71f73ce379725078..0e930c76ff8c0d1baa2858b16ec03aea27f7745d 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -650,7 +650,7 @@ if strstr "$modules_loaded" " fips " && command -v prelink >/dev/null; then
     done
 fi
 
-if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet | \
+if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \
     $compress > "$outfile"; ); then
     dfatal "dracut: creation of $outfile failed"
     exit 1
index 507f0c3a6f8d53cc19ebd954a716f7603e4d2c94..b11e37c0e0b757d6d43cf44c314fd3e61a3e53ed 100755 (executable)
@@ -317,7 +317,7 @@ inst_simple() {
         inst "${_src%/*}/.${_src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
     fi
     ddebug "Installing $_src"
-    cp -pfL "$_src" "${initdir}$target" 
+    cp --sparse=always -pfL "$_src" "${initdir}$target" 
 }
 
 # find symlinks linked to given library file