]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
mount-copybind: fix shellcheck warning
authorLuca Boccassi <bluca@debian.org>
Fri, 25 Mar 2022 18:40:31 +0000 (18:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 26 Mar 2022 09:33:28 +0000 (09:33 +0000)
$ 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 ...

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-core/volatile-binds/files/mount-copybind

index aad022c6e4c4c4329dfdfe00727fbed46e25e028..8bbb406b3a0b8916eed8a4f985bda274c4439840 100755 (executable)
@@ -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