Re: How to ensure a systemd unit waits for ntpd to sync before starting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Di, 02.04.19 14:47, Debraj Manna (subharaj.manna@xxxxxxxxx) wrote:

> Thanks for replying. Below is the service file for ntpd
>
> support@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

This is an automatically converted SysV service. It's not going to
match what systemd expects from this, and doesn't know systemd's
time-sync.target (which is a concept that didn't exist in SysV). You'd
have to write your own service file to make this work.

Usually, that's a job for your distribution however. Hence please
contact your distro for help about this, or check if there's a newer
version of the distro already that contains native systemd units.

Given that systemd is closing in on its 9th birthday maybe it's really
time for your distro to update things to systemd units.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux