From: Harald Hoyer Date: Fri, 22 Jun 2012 06:59:22 +0000 (+0200) Subject: dracut-functions.sh: cp with --reflink=auto and --sparse=auto X-Git-Tag: 020~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5b5bb310312fa2956cf9ff091aeeec84f1e6e6e;p=thirdparty%2Fdracut.git dracut-functions.sh: cp with --reflink=auto and --sparse=auto 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. --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 3b562e790..b9ce688ac 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -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