Don't force volatile directory to be a link if already mounted.
cover Don't force volatile directory to be a link if already mounted.
The following changes since commit 5b1c329804f9f3fadcc46452390f537052ff7d0e:
bitbake: bitbake-user-manual-fetching.xml: Grammar, typo, and tweaks. (2014-06-18 13:48:39 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/volatile
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/volatile
Kai Kang (1):
initscripts: update populate-volatile.sh
.../initscripts/initscripts-1.0/populate-volatile.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/1 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.
--- .../initscripts/initscripts-1.0/populate-volatile.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +6 -4
@@ -72,10 +72,12 @@ link_file() { if [ -L \"$2\" ]; then [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; }; elif [ -d \"$2\" ]; then - cp -a $2/* $1 2>/dev/null; - cp -a $2/.[!.]* $1 2>/dev/null; - rm -rf \"$2\"; - ln -sf \"$1\" \"$2\"; + if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then + cp -a $2/* $1 2>/dev/null; + cp -a $2/.[!.]* $1 2>/dev/null; + rm -rf \"$2\"; + ln -sf \"$1\" \"$2\"; + fi else ln -sf \"$1\" \"$2\"; fi
Signature · 1 line
1.9.1