mount-copybind: fix shellcheck warning

$ shellcheck meta/recipes-core/volatile-binds/files/mount-copybind

In meta/recipes-core/volatile-binds/files/mount-copybind line 54:
            mountcontext=",rootcontext=$(matchpathcon -n $mountpoint)"
                                                         ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
            mountcontext=",rootcontext=$(matchpathcon -n "$mountpoint")"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

(From OE-Core rev: 56c7962a6c31acfe0e118f713954aeafd7e2d9c0)

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Luca Boccassi
2022-03-25 18:40:31 +00:00
committed by Richard Purdie
parent 596fcd883f
commit 23ef894641

View File

@@ -48,7 +48,7 @@ if [ -d "$mountpoint" ]; then
# If that fails, fall back to slower copy.
if command -v selinuxenabled > /dev/null 2>&1; then
if selinuxenabled; then
mountcontext=",rootcontext=$(matchpathcon -n $mountpoint)"
mountcontext=",rootcontext=$(matchpathcon -n "$mountpoint")"
fi
fi
if ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext" "$mountpoint" > /dev/null 2>&1; then