[oe] [meta-systemd][PATCH v2 2/2] meta-systemd: ntp: Fix starting of ntpdate.service

Martin Ertsaas martiert at gmail.com
Fri Oct 26 08:58:40 UTC 2012


Make ntpdate.service run ntpdate instead of ntpd, as ntpd is not
necessarily installed. Also make ntpdate require network.target, as
you can not run ntpdate (or ntpd for that matter), without networking.

Signed-off-by: Martin Ertsaas <martiert at gmail.com>
---
 .../recipes-support/ntp/ntp/ntpdate.service        |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service b/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service
index b2bc632..a48d11d 100644
--- a/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service
+++ b/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service
@@ -1,10 +1,11 @@
 [Unit]
 Description=Network Time Service (one-shot ntpdate mode)
+Requires=network.target
 Before=ntpd.service
 
 [Service]
 Type=oneshot
-ExecStart=/usr/bin/ntpd -q -g -x
+ExecStart=/usr/bin/ntpdate pool.ntp.org
 RemainAfterExit=yes
 
 [Install]
-- 
1.7.8.6





More information about the Openembedded-devel mailing list