]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: cp with --reflink=auto and --sparse=auto
authorHarald Hoyer <harald@redhat.com>
Fri, 22 Jun 2012 06:59:22 +0000 (08:59 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 29 Jun 2012 10:41:25 +0000 (12:41 +0200)
cp will use COW data copy most of the time. So, it's even better than
hardlink, because we don't have to care about hardlinks, when modifying
files in post.

dracut-functions.sh

index 3b562e790ac4d1ad17b39249dfccda10711a3886..b9ce688ac1b792a4ffae1228498d232db21071f4 100755 (executable)
@@ -435,7 +435,7 @@ inst_simple() {
         inst "${_src%/*}/.${_src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
     fi
     ddebug "Installing $_src"
-    cp --sparse=always -pfL "$_src" "${initdir}/$target"
+    cp --reflink=auto --sparse=auto -pfL "$_src" "${initdir}/$target"
 }
 
 # find symlinks linked to given library file