wpa_supplicant service: Depend on interfaces being present

This commit is contained in:
Franz Pletz 2016-03-02 19:04:21 +01:00 committed by Robin Gloster
parent 7ddf8460a5
commit dcae10ebda

View File

@ -125,10 +125,12 @@ in {
# FIXME: start a separate wpa_supplicant instance per interface.
systemd.services.wpa_supplicant = let
ifaces = cfg.interfaces;
deviceUnit = interface: [ "sys-subsystem-net-devices-${interface}.device" ];
in {
description = "WPA Supplicant";
after = [ "network-interfaces.target" ];
requires = lib.concatMap deviceUnit ifaces;
wantedBy = [ "network.target" ];
path = [ pkgs.wpa_supplicant ];