mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 10:43:27 +00:00
* Restart ntpd when we get a new DHCP lease. Without this, if ntpd
previously failed to resolve the NTP server hostnames in its config file, it will happily sit in a loop forever doing nothing. svn path=/nixos/branches/modular-nixos/; revision=15830
This commit is contained in:
parent
674d63e212
commit
116306c8dc
@ -60,6 +60,15 @@ let
|
||||
|
||||
if test "$reason" = BOUND -o "$reason" = REBOOT; then
|
||||
${pkgs.glibc}/sbin/nscd --invalidate hosts
|
||||
|
||||
# Restart ntpd. (The "ip-up" event below will trigger the
|
||||
# restart.) We need to restart it to make sure that it will
|
||||
# actually do something: if ntpd cannot resolve the server
|
||||
# hostnames in its config file, then it will never do
|
||||
# anything ever again ("couldn't resolve ..., giving up on
|
||||
# it"), so we silently lose time synchronisation.
|
||||
${pkgs.upstart}/sbin/initctl stop ntpd
|
||||
|
||||
${pkgs.upstart}/sbin/initctl emit ip-up
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user