mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 03:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
c32490b139
commit
cf648b0d28
@@ -57,6 +57,7 @@ if [ -d "$mountpoint" ]; then
|
||||
fi
|
||||
fi
|
||||
if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" = 1 ] || ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext" "$mountpoint" > /dev/null 2>&1; then
|
||||
rm -rf "$overlay_workdir"
|
||||
|
||||
if [ "$specdir_existed" != "yes" ]; then
|
||||
cp -aPR "$mountpoint"/. "$spec/"
|
||||
|
||||
Reference in New Issue
Block a user