* Don't do a separate "ntp -q -g" to reset the system time in the ntp

start script.  It's probably not necessary, but more importantly, it
  can hang forever if the network is down.  (Actually it will sit in a
  loop waiting for UDP packets that will never arrive.)  This causes
  the NixOS reboot to hang, since Upstart can't kill jobs stuck in
  their start script.

svn path=/nixos/branches/modular-nixos/; revision=15829
This commit is contained in:
Eelco Dolstra 2009-06-02 19:40:14 +00:00
parent 720d51179e
commit 674d63e212

View File

@ -93,11 +93,16 @@ mkIf config.services.ntp.enable {
# Needed to run ntpd as an unprivileged user.
${modprobe}/sbin/modprobe capability || true
${ntp}/bin/ntpd -q -g ${ntpFlags}
# !!! This can hang indefinitely if the network is down or
# the servers are unreachable. This is particularly bad
# because Upstart cannot kill jobs stuck in the start
# phase. Thus a hanging ntpd job can block system
# shutdown.
# ${ntp}/bin/ntpd -q -g ${ntpFlags}
end script
respawn ${ntp}/bin/ntpd -n ${ntpFlags}
respawn ${ntp}/bin/ntpd -g -n ${ntpFlags}
'';
}];
};