]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix: shellcheck for modules.d/95rootfs-block/block-genrules.sh
authorHarald Hoyer <harald@redhat.com>
Fri, 12 Feb 2021 12:26:13 +0000 (13:26 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 15 Feb 2021 10:00:37 +0000 (11:00 +0100)
modules.d/95rootfs-block/block-genrules.sh

index 446ddf2ba117d982edf8258c565b023175d92e16..9d9f3ddae07f8fd7792dbf4c18a058263cc298cf 100755 (executable)
@@ -1,15 +1,18 @@
 #!/bin/sh
 
+# shellcheck disable=SC2154
 if [ "${root%%:*}" = "block" ]; then
     {
         printf 'KERNEL=="%s", SYMLINK+="root"\n' \
-            ${root#block:/dev/}
+            "${root#block:/dev/}"
         printf 'SYMLINK=="%s", SYMLINK+="root"\n' \
-            ${root#block:/dev/}
+            "${root#block:/dev/}"
     } >> /etc/udev/rules.d/99-root.rules
 
+    # shellcheck disable=SC2016
+    # shellcheck disable=SC2154
     printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \
-        "${root#block:}" "${root#block:}" > $hookdir/initqueue/settled/blocksymlink.sh
+        "${root#block:}" "${root#block:}" > "$hookdir"/initqueue/settled/blocksymlink.sh
 
     wait_for_dev "${root#block:}"
 fi