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).
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