summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-06-16 09:02:24 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-06-17 08:59:01 +0000
commitc6d7c8e3f965d79c0c59cfc4644a16ecf3b4b1c0 (patch)
tree84236eb0f9bb5c319b7ceda3d2b87575d1cc2326
parentb0d52ba04f979188888db4c46df60c043963e4d9 (diff)
downloaddefinitions-c6d7c8e3f965d79c0c59cfc4644a16ecf3b4b1c0.tar.gz
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
-rw-r--r--strata/ntpd/ntpd.morph6
1 files 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: