diff options
author | Ricardo Simoes <ricardo.simoes@pt.bosch.com> | 2024-07-18 08:46:34 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-18 17:21:39 +0100 |
commit | cf648b0d28b5d583326dac27fb4652202e1d7457 (patch) | |
tree | a82f18f0e290d75d2719de523d87cb98c7b4b2c3 /meta/recipes-core/volatile-binds/files | |
parent | c32490b139d99712d49af4948b2863fd5100135b (diff) | |
download | poky-cf648b0d28b5d583326dac27fb4652202e1d7457.tar.gz |
volatile-binds: Remove workdir if OverlayFS fails
To fulfill OverlayFS workdir requirements, the mount-copybind script
creates a workdir. But if the mount operation fails for any reason,
the workdir is left there.
Then, subsequent runs of mount-copybind will again try to
create the directory and pollute system logs with failed mkdir error
messages.
This commit mitigates the problem by unconditionally removing workdir
if the OverlayFS is not used or fails to run.
(From OE-Core rev: 7872edbb33024fc710ac683eaef5635b89a1b994)
Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/volatile-binds/files')
-rwxr-xr-x | meta/recipes-core/volatile-binds/files/mount-copybind | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind b/meta/recipes-core/volatile-binds/files/mount-copybind index da88d160ee..4f373412be 100755 --- a/meta/recipes-core/volatile-binds/files/mount-copybind +++ b/meta/recipes-core/volatile-binds/files/mount-copybind | |||
@@ -57,6 +57,7 @@ if [ -d "$mountpoint" ]; then | |||
57 | fi | 57 | fi |
58 | fi | 58 | fi |
59 | if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" = 1 ] || ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext" "$mountpoint" > /dev/null 2>&1; then | 59 | if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" = 1 ] || ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext" "$mountpoint" > /dev/null 2>&1; then |
60 | rm -rf "$overlay_workdir" | ||
60 | 61 | ||
61 | if [ "$specdir_existed" != "yes" ]; then | 62 | if [ "$specdir_existed" != "yes" ]; then |
62 | cp -aPR "$mountpoint"/. "$spec/" | 63 | cp -aPR "$mountpoint"/. "$spec/" |