diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-08-07 15:17:15 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-16 11:14:36 +0100 |
commit | 4485cd903e59550a33d6086fcf2b329d2b405035 (patch) | |
tree | 1713f11be1e415721b8d782c8a9b2db8f72903f5 /meta/recipes-core | |
parent | a7e8f83cbe1eca9f16af2b05c6cad327f80a5ffa (diff) | |
download | poky-4485cd903e59550a33d6086fcf2b329d2b405035.tar.gz |
populate-volatile.sh: use 'cp -a' to avoid potential problem
Previously, dead links in target directory will not be copied.
This is incorrect as dead links are not uncommon in our rootfs.
So we use '-a' option instead.
(From OE-Core rev: 742440441222e0627abbdd3eb2ee16401e8f4adf)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh index 0ff0e1af7f..915b7d0b93 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | |||
@@ -72,7 +72,8 @@ link_file() { | |||
72 | if [ -L \"$2\" ]; then | 72 | if [ -L \"$2\" ]; then |
73 | [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; }; | 73 | [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; }; |
74 | elif [ -d \"$2\" ]; then | 74 | elif [ -d \"$2\" ]; then |
75 | for f in $2/* $2/.[^.]*; do [ -e \$f ] && cp -rf \$f $1; done; | 75 | cp -a $2/* $1 2>/dev/null; |
76 | cp -a $2/.[!.]* $1 2>/dev/null; | ||
76 | rm -rf \"$2\"; | 77 | rm -rf \"$2\"; |
77 | ln -sf \"$1\" \"$2\"; | 78 | ln -sf \"$1\" \"$2\"; |
78 | else | 79 | else |