]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(virtiofs): ismounted has a dependency on the base module
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sat, 13 Aug 2022 17:29:11 +0000 (17:29 +0000)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 15 Aug 2022 15:36:48 +0000 (15:36 +0000)
When dracut.sh is called with "--modules virtiofs", make sure
dracut-lib.sh is installed by making the base module a dependency.

modules.d/95virtiofs/module-setup.sh
modules.d/95virtiofs/mount-virtiofs.sh

index e5f209e0a1c43bd7d04b819dec9e1b1688793c50..6e8e6c3cd36cdb647c81d3ad489146f013df6ca7 100755 (executable)
@@ -16,7 +16,7 @@ check() {
 
 # called by dracut
 depends() {
-    return 0
+    echo base
 }
 
 # called by dracut
index 507911cf5c67208653077d02922a00cb2767fa21..ddd8dcb88880ec7616c9a443e71c37edc4ccdfff 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/sh
 
+type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh
+
 if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then
     if ! { modprobe virtiofs || strstr "$(cat /proc/filesystems)" virtiofs; }; then
         die "virtiofs is required but not available."