Revisiting the NTP conundrum
by resolver from LinuxQuestions.org on (#55G6H)
In various threads people have proposed solutions for ntpdate not running at the right time i.e. immediately after DHCP has gotten the IP address and the name servers are accessible.
Some things I have tried:
1. At the end of rc.local, adding:
Code: ntpdate 0.pool.ntp.org time.nist.govThis is always run many seconds before DHCPCD gets its lease from the Wifi hotspot.
2. Adding a script to the /etc/NetworkManager/dispatcher.d directory and carefully setting the mode (per the man page) to 700. These scripts are never run.
3. Reading the DHCPCD manual page to look for a way to run a script right after the lease is obtained. I didn't find a way.
Maybe it is time to buy a real time clock dongle?


Some things I have tried:
1. At the end of rc.local, adding:
Code: ntpdate 0.pool.ntp.org time.nist.govThis is always run many seconds before DHCPCD gets its lease from the Wifi hotspot.
2. Adding a script to the /etc/NetworkManager/dispatcher.d directory and carefully setting the mode (per the man page) to 700. These scripts are never run.
3. Reading the DHCPCD manual page to look for a way to run a script right after the lease is obtained. I didn't find a way.
Maybe it is time to buy a real time clock dongle?