ntp: correct systemd EnvironmentFile, add ntpdate service
authorPeter A. Bigot <bigotp@acm.org>
Wed, 4 Jan 2012 02:21:05 +0000 (02:21 +0000)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:17:43 +0000 (08:17 -0800)
commit09ae35c45f2eda3c14d868a470344bb4eb0ca48a
treeb99ffd4e392a85bf24acc41e87b08acb75ba3a1d
parente77b269d948d9abc8a6e4b0f4c5dae89db7406ec
ntp: correct systemd EnvironmentFile, add ntpdate service

Eliminate EnvironmentFile from systemd unit descriptions.  /etc/ntp.conf
can't be sourced to set environment variables like NTPD_ARG.  Following the
rationale at http://0pointer.de/blog/projects/on-etc-sysinit.html it isn't
needed anyway; if you don't buy that, it should be:

  EnvironmentFile=-/etc/default/ntpd

Add one-shot ntpdate service which synchronizes local clock prior to
starting ntpd (which aborts if the local time is more than 1000 seconds off
of the server).  "systemctl enable ntpdate.service" not done by default
because this would be a behavior change.

Correct comment describing how to replace ntpdate (ntpdc doesn't take those
arguments).

Add comment to ntp.conf pointing out need to remove local hardware clock as
a reference when simulating ntpdate.

(From meta-openembedded rev: 42d6f4f36696faaf0e526b14bcc6daff51ab943b)

Signed-off-by: Peter A. Bigot <bigotp@acm.org>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-oe/recipes-support/ntp/files/ntp.conf
meta-openembedded/meta-oe/recipes-support/ntp/files/ntpd.service
meta-openembedded/meta-oe/recipes-support/ntp/files/ntpdate.service [new file with mode: 0644]
meta-openembedded/meta-oe/recipes-support/ntp/ntp.inc
meta-openembedded/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb