]> code.ossystems Code Review - openembedded-core.git/commitdiff
volatile-binds: Change cp to use -a instead of -p.
authorChris PeBenito <Christopher.PeBenito@microsoft.com>
Mon, 17 Jun 2019 19:05:22 +0000 (20:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Jun 2019 14:55:59 +0000 (15:55 +0100)
This is needed on SELinux systems, so the labels (xattrs) are preserved.

Signed-off-by: Chris PeBenito <Christopher.PeBenito@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/volatile-binds/files/mount-copybind

index fddf520053a4dc41566e032b3758fb9bfe31d401..e32e675308ca0669034801829f88de697ef53dd4 100755 (executable)
@@ -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"