[systemd-devel] How to ensure a systemd unit waits for ntpd to sync before starting?

Debraj Manna subharaj.manna at gmail.com
Tue Apr 2 10:58:11 UTC 2019


Thanks again for all the replies.

I am on Ubuntu 16.04 which is using systemd version 239. It appears to me
that systemd-time-wait-sync.service is not present on this version of
systemd.

I have one more question related to this. If I switch to using systemd's
timesyncd.service then in my service unit file I can use

After=time-sync.target
Wants=time-sync.target

Can someone let me know for how long will the unit wait for ntp sync to
happen before giving up ? Is there a way we can control this?

On Tue, Apr 2, 2019 at 4:24 PM Marc Haber <mh+systemd-devel at zugschlus.de>
wrote:

> On Tue, Apr 02, 2019 at 12:32:58PM +0200, Lennart Poettering wrote:
> > I thought people have noticed by now that systemd is really about
> > removing unnecessary shell scripts from all clean system boot
> > codepaths.
>
> The problem is that millions of professional systems administrators do
> violently disagree.
>
> I have seen unit files full of bash -c and quoting hell. Your work. Be
> proud of it.
>
> Greetings
> Marc
>
> --
>
> -----------------------------------------------------------------------------
> Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
> Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190402/867ccd45/attachment-0001.html>


More information about the systemd-devel mailing list