[ntp:questions] Regarding updation of IP addresses in the ntpd.conf file

Rob nomail at example.com
Thu Jul 19 07:24:22 UTC 2012


Arpith Nayak <arpithnayak at gmail.com> wrote:
>    What I am trying to do is write a program that reads the same .conf file
> used by ntpd and change it based on the user's requirements. I will be
> presenting the user with all the addresses that are stored in the .conf
> file and want to implement functionality in the program to make appropriate
> changes in the .conf file without resorting to ntpq. So to the user it will
> be something like this on the CLI:
>                            set NTP_Server_x xx.xx.xx.xx<IP addresss>
>  Is this possible? How does ntpd read the .conf file and parse the IP
> addresses and drift file location from the file?

Of course this is possible.
It is not important how ntpd reads the file.
You just write your tool that modifies the file and then you restart
ntpd to read the new file.

What you want to write already exists as part of some system management
programs.   E.g. YaST in SUSE Linux.



More information about the questions mailing list