* 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:
parent
e32640afab
commit
326891443c
|
@ -68,11 +68,10 @@ in
|
|||
|
||||
jobs.dhcpcd =
|
||||
{ startOn = "started network-interfaces";
|
||||
stopOn = "stopping network-interfaces";
|
||||
|
||||
path = [ dhcpcd pkgs.nettools pkgs.openresolv ];
|
||||
|
||||
exec = "dhcpcd --config ${dhcpcdConf} --nobackground --persistent";
|
||||
exec = "dhcpcd --config ${dhcpcdConf} --nobackground";
|
||||
};
|
||||
|
||||
environment.systemPackages = [ dhcpcd ];
|
||||
|
@ -85,7 +84,9 @@ in
|
|||
|
||||
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
|
||||
'';
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue