diff options
| author | Kai Kang <kai.kang@windriver.com> | 2014-06-19 15:31:52 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-24 19:54:11 +0100 |
| commit | d0f01d8a21b54e7a90d4566ff2469afa2d2a972e (patch) | |
| tree | e1504e3344796e1239264112f68572ca9587673b | |
| parent | 953b01e1de5de8076de326008293c89be30bb3d1 (diff) | |
| download | poky-d0f01d8a21b54e7a90d4566ff2469afa2d2a972e.tar.gz | |
initscripts: update populate-volatile.sh
If a partition such as /tmp mounted on a volatile directory which create
by script populate-volatile.sh from initscripts, it will show errors.
In /var/log/boot, error message:
Thu Jun 19 05:39:09 2014: bootlogd.
Thu Jun 19 05:39:10 2014: rm: cannot remove '/tmp': Device or resource busy
Check volatile directories and if it is be mounted then don't force make
it as a link.
(From OE-Core rev: cc4b0936c7a6a1563dc88d62d8c9020791eaa446)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | 10 |
1 files changed, 6 insertions, 4 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 e707b20049..904037eeaa 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | |||
| @@ -72,10 +72,12 @@ 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 | cp -a $2/* $1 2>/dev/null; | 75 | if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then |
| 76 | cp -a $2/.[!.]* $1 2>/dev/null; | 76 | cp -a $2/* $1 2>/dev/null; |
| 77 | rm -rf \"$2\"; | 77 | cp -a $2/.[!.]* $1 2>/dev/null; |
| 78 | ln -sf \"$1\" \"$2\"; | 78 | rm -rf \"$2\"; |
| 79 | ln -sf \"$1\" \"$2\"; | ||
| 80 | fi | ||
| 79 | else | 81 | else |
| 80 | ln -sf \"$1\" \"$2\"; | 82 | ln -sf \"$1\" \"$2\"; |
| 81 | fi | 83 | fi |
