From c6d7c8e3f965d79c0c59cfc4644a16ecf3b4b1c0 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Tue, 16 Jun 2015 09:02:24 +0000 Subject: Improve ntpd systemd unit and configuration Start ntpd with the `-N` and `-g` options, as recommended in the man page. `-N` will, to the extent permitted by the operating system, run the ntpd at the highest priority. `-g` will make ntpd to update the time even if the offset with the current time is greater than 1000s. Add 'limited' to the restrict options to avoid the following warning in the log: 'restrict ::: KOD does nothing without LIMITED'. Change-Id: I23e264533ef27af7a0504e8cd5b69c7e01843728 --- strata/ntpd/ntpd.morph | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strata/ntpd/ntpd.morph b/strata/ntpd/ntpd.morph index 49316c14..b13f4312 100644 --- a/strata/ntpd/ntpd.morph +++ b/strata/ntpd/ntpd.morph @@ -13,7 +13,7 @@ post-install-commands: [Service] Type=forking - ExecStart=/usr/bin/ntpd -u ntp:ntp + ExecStart=/usr/bin/ntpd -u ntp:ntp -Ng PrivateTmp=True Restart=on-failure @@ -40,8 +40,8 @@ post-install-commands: # matching hosts # # see ntp.conf(5) for more details - restrict -4 default kod notrap nomodify - restrict -6 default kod notrap nomodify + restrict -4 default limit kod notrap nomodify + restrict -6 default limit kod notrap nomodify EOF - install -D -m 644 ntp.conf "$DESTDIR"/etc/ntp.conf system-integration: -- cgit v1.2.1