]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(network): call both check_module and module_check
authorJo Zzsi <jozzsicsataban@gmail.com>
Fri, 20 Sep 2024 03:10:48 +0000 (23:10 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Sun, 29 Sep 2024 01:57:30 +0000 (21:57 -0400)
Add back testing the module with check_module as well as module_check.

Without this PR, on some Linux distributions (e.g. Void) adding `network` meta module
no longer works as it tries and fails to install the preferred netowrking backend
(network-manager).

modules.d/40network/module-setup.sh

index c8ba54402b1acc969531f373e703e17c5944214e..65c1b660539c80fc3ff81841740053701dd4a82c 100755 (executable)
@@ -21,7 +21,7 @@ depends() {
     for module in network-manager systemd-networkd connman; do
         # install the first viable module, unless there omitted
         module_check $module > /dev/null 2>&1
-        if [[ $? == 255 ]] && ! [[ " $omit_dracutmodules " == *\ $module\ * ]]; then
+        if [[ $? == 255 ]] && ! [[ " $omit_dracutmodules " == *\ $module\ * ]] && check_module "$module"; then
             echo "$module"
             return 0
         fi