* [PATCH 0/1] Don't force volatile directory to be a link if already mounted.
@ 2014-06-19 7:31 Kai Kang
2014-06-19 7:31 ` [PATCH 1/1] initscripts: update populate-volatile.sh Kai Kang
0 siblings, 1 reply; 2+ messages in thread
From: Kai Kang @ 2014-06-19 7:31 UTC (permalink / raw)
To: openembedded-core
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(-)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] initscripts: update populate-volatile.sh
2014-06-19 7:31 [PATCH 0/1] Don't force volatile directory to be a link if already mounted Kai Kang
@ 2014-06-19 7:31 ` Kai Kang
0 siblings, 0 replies; 2+ messages in thread
From: Kai Kang @ 2014-06-19 7:31 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
.../initscripts/initscripts-1.0/populate-volatile.sh | 10 ++++++----
1 file 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 e707b20..904037e 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() {
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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-19 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19 7:31 [PATCH 0/1] Don't force volatile directory to be a link if already mounted Kai Kang
2014-06-19 7:31 ` [PATCH 1/1] initscripts: update populate-volatile.sh Kai Kang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.