Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] volatile-binds: Change cp to use -a instead of -p.
@ 2019-06-17 19:05 luca.boccassi
  0 siblings, 0 replies; only message in thread
From: luca.boccassi @ 2019-06-17 19:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Chris PeBenito

From: Chris PeBenito <Christopher.PeBenito@microsoft.com>

This is needed on SELinux systems, so the labels (xattrs) are preserved.

Signed-off-by: Chris PeBenito <Christopher.PeBenito@microsoft.com>
---
 meta/recipes-core/volatile-binds/files/mount-copybind | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind b/meta/recipes-core/volatile-binds/files/mount-copybind
index fddf520053..e32e675308 100755
--- a/meta/recipes-core/volatile-binds/files/mount-copybind
+++ b/meta/recipes-core/volatile-binds/files/mount-copybind
@@ -42,14 +42,14 @@ if [ -d "$mountpoint" ]; then
     if ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir" "$mountpoint" > /dev/null 2>&1; then
 
         if [ "$specdir_existed" != "yes" ]; then
-            cp -pPR "$mountpoint"/. "$spec/"
+            cp -aPR "$mountpoint"/. "$spec/"
         fi
 
         mount -o "bind$options" "$spec" "$mountpoint"
     fi
 elif [ -f "$mountpoint" ]; then
     if [ ! -f "$spec" ]; then
-        cp -pP "$mountpoint" "$spec"
+        cp -aP "$mountpoint" "$spec"
     fi
 
     mount -o "bind$options" "$spec" "$mountpoint"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-17 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 19:05 [PATCH] volatile-binds: Change cp to use -a instead of -p luca.boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox