diff options
author | Peter A. Bigot <bigotp@acm.org> | 2012-01-04 02:21:05 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-01-05 10:15:55 +0100 |
commit | 42d6f4f36696faaf0e526b14bcc6daff51ab943b (patch) | |
tree | c05f6e11c9239ec68830cd085db988285e2777ae /meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | |
parent | dc32361d19b49c9cb2df1d73dc61dfe7255a11b2 (diff) | |
download | meta-openembedded-42d6f4f36696faaf0e526b14bcc6daff51ab943b.tar.gz |
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.
Signed-off-by: Peter A. Bigot <bigotp@acm.org>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb')
-rw-r--r-- | meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb index e2bb1a806..063d82a87 100644 --- a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb +++ b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require ntp.inc | 1 | require ntp.inc |
2 | 2 | ||
3 | PR = "r3" | 3 | PR = "r4" |
4 | 4 | ||
5 | inherit systemd | 5 | inherit systemd |
6 | 6 | ||
@@ -13,6 +13,7 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ | |||
13 | file://ntpd \ | 13 | file://ntpd \ |
14 | file://ntp.conf \ | 14 | file://ntp.conf \ |
15 | file://ntpdate \ | 15 | file://ntpdate \ |
16 | file://ntpdate.service \ | ||
16 | file://ntpd.service \ | 17 | file://ntpd.service \ |
17 | " | 18 | " |
18 | 19 | ||
@@ -29,6 +30,7 @@ do_install_append() { | |||
29 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d | 30 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d |
30 | 31 | ||
31 | install -d ${D}${base_libdir}/systemd/system | 32 | install -d ${D}${base_libdir}/systemd/system |
33 | install -m 0644 ${WORKDIR}/ntpdate.service ${D}${base_libdir}/systemd/system/ | ||
32 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/ | 34 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/ |
33 | } | 35 | } |
34 | 36 | ||