done
if [ -z "$network_handler" ]; then
- if [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then
+ if check_module "connman"; then
network_handler="connman"
- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
+ elif check_module "network-manager"; then
network_handler="network-manager"
- elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
+ elif check_module "systemd-networkd"; then
network_handler="systemd-networkd"
else
network_handler="network-legacy"