summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorJens Rehsack <rehsack@gmail.com>2016-02-12 10:17:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-13 08:27:17 +0000
commitab42fcaf1427a29c31ac2e93965e20849b1b1234 (patch)
tree249130ef66473506350bda9bfd6354b8d30c6346 /meta/recipes-core/initscripts
parent71882b061bad55f4ad62c7d235a4a629dd74dda8 (diff)
downloadopenembedded-core-contrib-ab42fcaf1427a29c31ac2e93965e20849b1b1234.tar.gz
openembedded-core-contrib-ab42fcaf1427a29c31ac2e93965e20849b1b1234.tar.bz2
openembedded-core-contrib-ab42fcaf1427a29c31ac2e93965e20849b1b1234.zip
initscripts: populate-volatiles.sh: add mount-bind feature
Add ability to run "mount --bind" to populate-volatiles. Since several programs use realpath to determine several full qualified file names, there is no symlink to be resolved. So when speccing /run/lock - that's the location - not /var/run/lock because of the program is smarter than the operator/distributor. See https://github.com/rehsack/meta-jens/blob/jethro/recipes-core/initscripts/initscripts/volatiles for an example how to use the "b" feature. Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh10
1 files changed, 10 insertions, 0 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 904037eeaa..ce4622a5e5 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -163,6 +163,16 @@ apply_cfgfile() {
continue
}
+ [ "${TTYPE}" = "b" ] && {
+ TSOURCE="$TLTARGET"
+ [ "${VERBOSE}" != "no" ] && echo "Creating mount-bind -${TNAME}- from -${TSOURCE}-."
+ mount --bind "${TSOURCE}" "${TNAME}"
+ EXEC="
+ mount --bind \"${TSOURCE}\" \"${TNAME}\""
+ test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
+ continue
+ }
+
[ -L "${TNAME}" ] && {
[ "${VERBOSE}" != "no" ] && echo "Found link."
NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`