1 |
On Fri, Apr 04, 2014 at 12:30:31AM +0200, Michał Górny wrote: |
2 |
> + if cp --reflink=auto --version &>/dev/null; then |
3 |
> + # enable reflinking if possible to make this faster |
4 |
> + cp_args+=( --reflink=auto ) |
5 |
> fi |
6 |
> |
7 |
> + cp -P -R -p "${cp_args[@]}" "${src}"/. "${dest}"/ |
8 |
> + ret=${?} |
9 |
-p in GNU cp is --preserve=mode,ownership,timestamps which will cause |
10 |
the loss of selinux contexts, xattr and hardlinks. |
11 |
|
12 |
I know you want to be POSIX compatible, but I think passing |
13 |
--preserve=all or -a is important in this case. |
14 |
|
15 |
-- |
16 |
Robin Hugh Johnson |
17 |
Gentoo Linux: Developer, Infrastructure Lead |
18 |
E-Mail : robbat2@g.o |
19 |
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 |