I do see a ntp-wait. Can some one let me know what corresponding condition I should place in my service unit file to wait for this?
On Tue, Apr 2, 2019 at 2:47 PM Debraj Manna <subharaj.manna@xxxxxxxxx> wrote:
Thanks for replying. Below is the service file for ntpdsupport@vrni-platform:/etc/init.d$ sudo systemctl cat ntp.service # /run/systemd/generator.late/ntp.service # Automatically generated by systemd-sysv-generator [Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/ntp Description=LSB: Start NTP daemon Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target After=network-online.target After=remote-fs.target After=systemd-journald-dev-log.socket Wants=network-online.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes ExecStart=/etc/init.d/ntp start ExecStop=/etc/init.d/ntp stop
On Tue, Apr 2, 2019 at 1:48 PM Lennart Poettering <lennart@xxxxxxxxxxxxxx> wrote:On Di, 02.04.19 10:05, Reindl Harald (h.reindl@xxxxxxxxxxxxx) wrote:
> Am 02.04.19 um 09:44 schrieb Debraj Manna:
> >
> > We have a service that starts at boot. We need to ensure it doesn't
> > start until the system clock has been synchronized via ntp. The
> > machines are using |ntpd|
>
> After=ntpd.service
> Wants=ntpd.service
I don't know ntpd. But I surely hope that just starting ntpd will
delay boot-up until a sync is reached. If it does, then this would be
a bug and a misdesign in the ntpd unit files.
(See my other mail how ntpd should do this correctly.)
Lennart
--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel