dracut/0035-dracut-cp-with-sparse.patch
2011-10-19 15:30:00 +02:00

37 lines
1.1 KiB
Diff

From 59f288ce631a7793755d16ee26fef0355098d33a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 2 Sep 2011 09:01:47 +0200
Subject: [PATCH] dracut: cp with sparse
---
dracut | 2 +-
dracut-functions | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut b/dracut
index fd36805..0e930c7 100755
--- 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
diff --git a/dracut-functions b/dracut-functions
index 507f0c3..b11e37c 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -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