diff options
| author | Jens Rehsack <rehsack@gmail.com> | 2016-02-12 10:17:32 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-14 11:42:19 +0000 |
| commit | 85ac8eb4738ca8731c76b13ae81edea531438047 (patch) | |
| tree | 2017032d6fb1d665546b6b4fb39e652fad374635 /meta/recipes-core | |
| parent | be5b72cf27e580adfb24b1236d4b7719aa0da498 (diff) | |
| download | poky-85ac8eb4738ca8731c76b13ae81edea531438047.tar.gz | |
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.
(From OE-Core rev: ab42fcaf1427a29c31ac2e93965e20849b1b1234)
Signed-off-by: Jens Rehsack <sno@netbsd.org>
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 | 10 |
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() { | |||
| 163 | continue | 163 | continue |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | [ "${TTYPE}" = "b" ] && { | ||
| 167 | TSOURCE="$TLTARGET" | ||
| 168 | [ "${VERBOSE}" != "no" ] && echo "Creating mount-bind -${TNAME}- from -${TSOURCE}-." | ||
| 169 | mount --bind "${TSOURCE}" "${TNAME}" | ||
| 170 | EXEC=" | ||
| 171 | mount --bind \"${TSOURCE}\" \"${TNAME}\"" | ||
| 172 | test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build | ||
| 173 | continue | ||
| 174 | } | ||
| 175 | |||
| 166 | [ -L "${TNAME}" ] && { | 176 | [ -L "${TNAME}" ] && { |
| 167 | [ "${VERBOSE}" != "no" ] && echo "Found link." | 177 | [ "${VERBOSE}" != "no" ] && echo "Found link." |
| 168 | NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'` | 178 | NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'` |
