1.Description of Problem: If use this command with option "-c ntp.conf", the remote host cannot update the time from the local host successful. 2.How reproducible: 100%. 3.Step to Reproduce: ntp server: 1, execute command "date -s 061116" 2, set ip 192.168.0.1 3, execute command "service ntpd stop" 4, execute command "echo "server 127.127.1.0" > ntp.conf" 5, execute command "ntpd -c ntp.conf" ntp client: 1, wait 10 minutes 2, execute command "date -s 061115" 3, set ip 192.168.0.2 4, execute command "ntpdate 192.168.0.1" 5, execute command "date" 6, confirm the date is "061116" 4.Actual results: The date on the ntp client is "061115". 5.Expected results: The date on the ntp client is "061116".
Created attachment 160487 [details] the patch to the ntpd manpage for "-c"
The path can be relative, it's just that ntpd (if -n or -d option wasn't specified) changes the current working directory to /.
*** This bug has been marked as a duplicate of 246568 ***
In ntpd, if we use the relative path, it must be relative to "/" which is not the current working directory. For the users, it may be difficult to understand. So I suggest to modify the the description for "-c" and "-p" option in the manpage.
It's ok with me. The patch needs to take into account -n and -d options as running "ntpd -n -c ./ntp.conf" will read the file from the current working directory.