Bug 250529 - Use option "-c" with relative path can't specify ntp config data
Summary: Use option "-c" with relative path can't specify ntp config data
Status: CLOSED DUPLICATE of bug 246568
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ntp
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Miroslav Lichvar
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2007-08-02 01:32 UTC by zhangxiliang
Modified: 2007-11-30 22:07 UTC (History)
0 users

Clone Of:
Last Closed: 2007-08-07 08:46:56 UTC

Attachments (Terms of Use)
the patch to the ntpd manpage for "-c" (473 bytes, patch)
2007-08-02 01:32 UTC, zhangxiliang
no flags Details | Diff

Description zhangxiliang 2007-08-02 01:32:14 UTC
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:
3.Step to Reproduce:
  ntp server:
  1, execute command "date -s 061116"
  2, set ip
  3, execute command "service ntpd stop"
  4, execute command "echo "server" > ntp.conf"
  5, execute command "ntpd -c ntp.conf"
  ntp client:
  1, wait 10 minutes
  2, execute command "date -s 061115"
  3, set ip
  4, execute command "ntpdate"
  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".

Comment 1 zhangxiliang 2007-08-02 01:32:14 UTC
Created attachment 160487 [details]
the patch to the ntpd manpage for "-c"

Comment 2 Miroslav Lichvar 2007-08-06 15:22:57 UTC
The path can be relative, it's just that ntpd (if -n or -d option wasn't
specified) changes the current working directory to /.

Comment 3 Miroslav Lichvar 2007-08-07 08:46:56 UTC

*** This bug has been marked as a duplicate of 246568 ***

Comment 4 zhangxiliang 2007-08-08 10:07:48 UTC
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. 

Comment 5 Miroslav Lichvar 2007-08-08 10:37:14 UTC
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

Note You need to log in before you can comment on or make changes to this bug.