git.iko.soy/typeable/nixpkgs
on master help sign in
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>

commit030895f075af7308bbbdbe2945a43e65342a326c authoraszlig <aszlig@redmoonstudios.org> dateSun 22 Feb 2015, 08:09 (12 years ago) parent0696b0e
1 file changed+1−1
nixos/modules/services/networking/dhcpcd.nix+1−1
nixos/modules/services/networking/dhcpcd.nix+1−1
@@ -184,7 +184,7 @@ in
184184 }
185185 ];
186186
187− powerManagement.resumeCommands =
187+ powerManagement.resumeCommands = mkIf config.systemd.services.dhcpcd.enable
188188 ''
189189 # Tell dhcpcd to rebind its interfaces if it's running.
190190 ${config.systemd.package}/bin/systemctl reload dhcpcd.service