1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

* dhcpcd: Don't use the "persistent" option. With it, dhcpcd won't

delete routes and addresses when it quits.  This causes those routes
  and addresses to stick around forever, since dhcpcd won't delete
  them when it runs next (even if it acquires a new lease on the same
  interface).  This is bad; in particular the stale (default) routes
  can break networking.

  The downside to removing "persistent" is that you should never ever
  do "stop dhcpcd" on a remote machine configured by dhcpcd.

svn path=/nixos/trunk/; revision=33388
This commit is contained in:
Eelco Dolstra 2012-03-23 21:00:32 +00:00
parent e32640afab
commit 326891443c

View file

@ -68,11 +68,10 @@ in
jobs.dhcpcd = jobs.dhcpcd =
{ startOn = "started network-interfaces"; { startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
path = [ dhcpcd pkgs.nettools pkgs.openresolv ]; path = [ dhcpcd pkgs.nettools pkgs.openresolv ];
exec = "dhcpcd --config ${dhcpcdConf} --nobackground --persistent"; exec = "dhcpcd --config ${dhcpcdConf} --nobackground";
}; };
environment.systemPackages = [ dhcpcd ]; environment.systemPackages = [ dhcpcd ];
@ -85,7 +84,9 @@ in
powerManagement.resumeCommands = powerManagement.resumeCommands =
'' ''
${config.system.build.upstart}/sbin/restart dhcpcd # Tell dhcpcd to rebind its interfaces if it's running.
status="$(${config.system.build.upstart}/sbin/status dhcpcd)"
[[ "$status" =~ start/running ]] && ${dhcpcd}/sbin/dhcpcd --rebind
''; '';
}; };