]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(btrfs): shellcheck for modules.d/90btrfs
authorHarald Hoyer <harald@redhat.com>
Fri, 26 Mar 2021 09:29:18 +0000 (10:29 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 29 Mar 2021 08:09:26 +0000 (10:09 +0200)
modules.d/90btrfs/.shchkdir [new file with mode: 0644]
modules.d/90btrfs/module-setup.sh

diff --git a/modules.d/90btrfs/.shchkdir b/modules.d/90btrfs/.shchkdir
new file mode 100644 (file)
index 0000000..e69de29
index bb0b4c3e25676d1a96f59b022ccf8a67e79c414b..279ff1459ce0d8086068a7fca9873585f208afd7 100755 (executable)
@@ -2,7 +2,6 @@
 
 # called by dracut
 check() {
-    local _rootdev
     # if we don't have btrfs installed on the host system,
     # no point in trying to support it in the initramfs.
     require_binaries btrfs || return 1
@@ -49,8 +48,8 @@ install() {
     fi
 
     inst_multiple -o btrfsck btrfs-zero-log
-    inst $(command -v btrfs) /sbin/btrfs
+    inst "$(command -v btrfs)" /sbin/btrfs
     # Hack for slow machines
     # see https://github.com/dracutdevs/dracut/issues/658
-    echo "rd.driver.pre=btrfs" > ${initdir}/etc/cmdline.d/00-btrfs.conf
+    echo "rd.driver.pre=btrfs" > "${initdir}"/etc/cmdline.d/00-btrfs.conf
 }