Ntp documentation maybe an update is needed

Hello,

While reviewing the current OpenWrt NTP documentation, I noticed that it covers several methods to set the system time:

  • manual update via date / busybox-date

  • one-time synchronization using ntpd -q

  • persistent synchronization via sysntpd or ntpd

  • legacy rdate usage

However, there is no example showing how to update the system time via /etc/rc.local at boot.

Using /etc/rc.local can be useful in scenarios where a user wants a one-time NTP update immediately after the network is available, before sysntpd starts, or in environments where network initialization might be delayed. A minimal example could be:

#!/bin/sh
sleep 60    # wait for network
ntpd -q -p pool.ntp.org
exit 0

I think it could be helpful to document this as an optional, advanced method for users who need immediate time synchronization at boot.

My questions for the community:

  1. Would including a /etc/rc.local example be appropriate for the documentation?

  2. Are there best practices or caveats that should be highlighted (e.g., waiting for network, avoiding conflicts with sysntpd)?

I would appreciate any feedback before proposing a concrete update to the documentation.

I use ntpdate 10.10.1.240 in my /etc/rc.local to synchronize time from a local time server. I don’t configure an ntp client on my OO box w/RTC, but do on other platforms. My understanding is that network should be up by the time init completes so sleep x I don’t use.

This page? https://openwrt.org/docs/guide-user/services/ntp/client-server

It is a bit ancient, still usable.chrony-nts missing for example.