summary refs log tree commit diff
path: root/nixos/modules/services/networking/dhcpcd.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-02-22 08:09:04 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-02-22 08:09:04 +0100
commit030895f075af7308bbbdbe2945a43e65342a326c (patch)
treead21632bb165209e93408961a50cc458ec604a8c /nixos/modules/services/networking/dhcpcd.nix
parent0696b0ef7843bbd50592bad64efeb61634052a8e (diff)
downloadnixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.tar
nixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.tar.gz
nixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.tar.bz2
nixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.tar.lz
nixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.tar.xz
nixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.tar.zst
nixpkgs-030895f075af7308bbbdbe2945a43e65342a326c.zip
nixos/dhcpcd: Only run resume commands if enabled.
The networkd implementation sets systemd.services.dhcpcd.enable to
false in nixos/modules/tasks/network-interfaces-systemd.nix. So we need
to respect that in the dhcpcd module.

If we don't, the resumeCommand is set nevertheless, which causes the
post-resume.service to fail after resuming:

Failed to reload dhcpcd.service: Unit dhcpcd.service is masked.
post-resume.service: main process exited, code=exited, status=1/FAILURE
Failed to start Post-Resume Actions.
Dependency failed for Post-Resume Actions.
Unit post-resume.service entered failed state.
post-resume.service failed.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules/services/networking/dhcpcd.nix')
-rw-r--r--nixos/modules/services/networking/dhcpcd.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index 0430d31b99a..8552395fdb1 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -184,7 +184,7 @@ in
         }
       ];
 
-    powerManagement.resumeCommands =
+    powerManagement.resumeCommands = mkIf config.systemd.services.dhcpcd.enable
       ''
         # Tell dhcpcd to rebind its interfaces if it's running.
         ${config.systemd.package}/bin/systemctl reload dhcpcd.service