Hi people,
As systemd handles netwok, I can do it as well with time!
You can safely delete every ntp package and edit the file:
/etc/systemd/timesyncd.conf
and change its content to:
[Time]
NTP=0.ch.pool.ntp.org 1.ch.pool.ntp.org 2.ch.pool.ntp.org 3.ch.pool.ntp.org
FallbackNTP=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org
2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org
enable systemd-timesync with:
systemctl enable systemd-timesyncd
and done!
When I restart, after network is up the time is synchronized in
background until lightdm is up.....
best, Tamer
On 3/11/19 9:23 AM, Neil Bothwick wrote:
On Sun, 10 Mar 2019 18:55:29 -0400, Rich Freeman wrote:
Mar 11 00:33:37 localhost ntpdate[4553]: Exiting, name server cannot
be used: Temporary failure in name resolution (-3)11 Mar 00:33:37
ntpdate[4553]: name server cannot be used: Temporary failure in name
resolution (-3)
Ok, you didn't mention what you're using for a network manager. How
is the network interface being configured in the first place? There
are several ways that it is commonly done.
Also, what are you using for DNS? In particular, are you running a
local DNS server, or are you relying on a network-supplied DNS server?
How is /etc/resolv.conf being created (likely by the network manager,
but maybe it is being done in another way).
Also, where is the NTP server? On the local network or external?
ntpdate by default depends on network-online.target and not on
nss-lookup.target, which can sometimes lead to issues if you're
running a DNS server that isn't online when the network is online
(such as a local server).
The definitions of when a network is actually online are variable, see
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
You may need to add NetworkManager-wait-online.service or
systemd-networkd-wait-online.service to the dependencies for ntpdate,
which is possibly why Rich is asking how you manage your network.
I don't use ntpdate here but systemd-timesyncd.service instead, which
seems to handle this better.