bofc manual pages
ntpd-setwait is very simple program that will do the following:
* wait indefinitely for internet connection
* read current UTC time from ntp server
* if local and ntp time differance is bigger than max-deviation - set system time with ntp time
* start ntpd-bin program.
If at any point there is an error, program goes back to start and tries again, until all steps succeed and ntpd-bin is executed. ntpd-bin is executed with execve() syscall, so after that ntpd-setwait cease to exist.
- Run program in foreground - this may be usefull when you want to stop system boot until time is synchronized (pass proper option to your ntpd to make it go into background if you don't want to hang up your boot completely). Or you want to use external supervisor - remember ntpd pid will be the same as ntpd-setwait due to execve() function.
- Fork program into background. This is usefull when you want time to be synchronized, but you don't really care if this happens now or after couple of hours when internet shows up. Just make sure your programs are resistant to immediate jump from past to the present.
- Positional argument. At startup program will read ntp time and localtime. If local time is different than the one on the ntp server for more than max-deviation seconds, ntpd-setwait will set system time to time returned by ntp server.
- Positional argument. Absolute path to ntpd binary you want to use. It's usually /usr/sbin/ntpd.
- Positional and optional argument. Options that should be passed to ntpd-bin executable.
Please report all bugs to "Michał Łyszczek <firstname.lastname@example.org>"
14 April 2019 (v0.1.0)