#9068 closed defect (fixed)
update-leap for ntp does not work
Reported by: | Pierre Labastie | Owned by: | Pierre Labastie |
---|---|---|---|
Priority: | normal | Milestone: | 8.1 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
There are two issues:
- A perl regular expression which does not work with /etc/ntp.conf from the book. The following perl RE is used for extracting the name of the leap-seconds file from /etc/ntp.conf:
/^ *leapfile\s+"(\S+)"/
This suppose that the file occurs in a line of the form:
leapfile "/path/to/leap/seconds/file"
with explicit quotes. If, as we advise, the line is of the form:
leapfile /path/to/leap/seconds/file
the perl RE does not find the file. In the documentation, nothing says the quotes should be there. And in examples from internet, some have quotes, and some haven't...
- A download site, which is not accessible if some perl modules are not built. For downloading the file, the script uses File::Fetch, which, according to http://search.cpan.org/~bingos/File-Fetch-0.52/lib/File/Fetch.pm, is not set up for https urls. But the default download site is https://www.ietf.org/timezones/data/leap-seconds.list, which make the download hang. Another one is given in a comment in the script, but not used: ftp://time.nist.gov/pub/leap-seconds.list, but this one works, if used in place of the other...
Change History (7)
comment:1 by , 8 years ago
comment:3 by , 8 years ago
Owner: | changed from | to
---|
comment:4 by , 8 years ago
Status: | new → assigned |
---|
A lot of research for a small result: just change https to http in the file allows the file to be downloaded.
Note:
See TracTickets
for help on using tickets.
A perl RE that would work with and without quotes could be:
But perl wizzards might propose a better alternative.