From 0d39390ad4c6a40594a5516575094834a2d5a291 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 4 Mar 2012 15:34:44 +0000 Subject: [PATCH] * ntpd: cleanup. svn path=/nixos/trunk/; revision=32769 --- modules/services/networking/ntpd.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/modules/services/networking/ntpd.nix b/modules/services/networking/ntpd.nix index b8624cd6cdf..d44aedc6e15 100644 --- a/modules/services/networking/ntpd.nix +++ b/modules/services/networking/ntpd.nix @@ -15,7 +15,6 @@ let modprobe = config.system.sbin.modprobe; configFile = pkgs.writeText "ntp.conf" '' - driftfile ${stateDir}/ntp.drift # Keep the drift file in ${stateDir}/ntp.drift. However, since we # chroot to ${stateDir}, we have to specify it as /ntp.drift. driftfile /ntp.drift @@ -70,6 +69,8 @@ in home = stateDir; }; + boot.kernelModules = [ "capability" ]; + jobs.ntpd = { description = "NTP daemon"; @@ -81,16 +82,6 @@ in '' mkdir -m 0755 -p ${stateDir} chown ${ntpUser} ${stateDir} - - # Needed to run ntpd as an unprivileged user. - ${modprobe}/sbin/modprobe --quiet capability || true - - # !!! 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. - # ntpd -q -g ${ntpFlags} ''; exec = "ntpd -g -n ${ntpFlags}";