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