summaryrefslogtreecommitdiff
path: root/systemd-units/ntpd.service.in
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-29 15:27:46 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-30 12:35:26 +0000
commit0cbca4c5ddd57bb6201b9547a9e1fd3cd75b2008 (patch)
treebe41eb72d49fe1e110a91b8a7b259fae51268c1b /systemd-units/ntpd.service.in
parent2e836dffc909b6534ef80af405f27f1aae2c7e4e (diff)
downloadbusybox-0cbca4c5ddd57bb6201b9547a9e1fd3cd75b2008.tar.gz
Make NTP run continuouslybaserock/liw/S8704-always-ntpd
With these changes: * NTP is run at boot time, once, to set the system clock. This allows the rest of the boot to continue as soon as time is set, which should happen as soon as there is networking. This is necessary because there's parts of the system that need to wait for the system clock to be set. * NTP is then also started as a daemon, which runs continuously, until stopped by the user, to keep system clock synchronised. The two systemd units need to be separate, otherwise we can't have network.target depend on a unit that finishes quickly: the daemon unit doesn't exit until there's an error.
Diffstat (limited to 'systemd-units/ntpd.service.in')
-rw-r--r--systemd-units/ntpd.service.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/systemd-units/ntpd.service.in b/systemd-units/ntpd.service.in
index 96ce5ac99..7226c872a 100644
--- a/systemd-units/ntpd.service.in
+++ b/systemd-units/ntpd.service.in
@@ -1,8 +1,10 @@
[Unit]
-Description=Network Time Protocol client
+Description=Keep clock synchronised with NTP
Before=network.target
+After=ntpd-boot.service
[Service]
-Type=oneshot
-ExecStart=/usr/bin/ntpd-set.sh
-RemainAfterExit=true
+Type=simple
+ExecStart=/usr/sbin/run-ntpd-with-config -n
+Restart=on-failure
+RestartSec=15