]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut): --list-modules should imply --no-kernel as well
authorJo Zzsi <jozzsicsataban@gmail.com>
Fri, 13 Sep 2024 12:50:05 +0000 (08:50 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Sat, 14 Sep 2024 12:19:24 +0000 (08:19 -0400)
This will ensure that 'dracut --list-modules' works well in a container.

dracut.sh

index 0c27743ac4e2ed3341cc36dca0d1cb8d25205f46..a289b7f4f94e59aae2547c7f89dfae54d2f2b115 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -810,7 +810,11 @@ while :; do
         --no-compress) _no_compress_l="cat" ;;
         --gzip) compress_l="gzip" ;;
         --enhanced-cpio) enhanced_cpio_l="yes" ;;
-        --list-modules) do_list="yes" ;;
+        --list-modules)
+            do_list="yes"
+            kernel_only="no"
+            no_kernel="yes"
+            ;;
         -M | --show-modules)
             show_modules_l="yes"
             ;;