[ntp:hackers] Replacement of hardcoded file paths.

Harlan Stenn stenn at ntp.org
Mon May 14 06:40:09 UTC 2012


Brian wrote:

> I am working on the next upgrade for Solaris, and I need to revisit this 
> issue. 

What's your timetable?

Not sure if/how this will work with Windows.

> I have a better understanding how the genLocInfo file works, but 
> I don't see any obvious way to extend it to work with these file paths. 
> Harlan, I think when we last discussed this you mentioned that you 
> thought you saw a way. Could you elaborate?
>
> On 08/09/11 08:09, Brian Utterback wrote:
> > Okay, so if we go the locfile route, we need to specify:
> >
> > 1, path for ntpstatedir, equal by default for legacy "/var/NTP", that
> > gets set to a macro in config.h. The macro currently is NTP_VAR.

I think we can just create a new variable for this, in the loc files,
with a small change to the genLocInfo script.

> > 2. path for ntpconfdir, which would be used as the root path for
> > ntp.conf, ntp.audio.

This will be similar, but will also need code changes to use the new
variable.

include/ntp_config.h's CONFIG_FILE and libntp/audio.c's INIT_FILE .
We'll need to pick a useful keyword/directory name and separate this
from the filename.

> > 3. path for ntpkeysdir. I think it might be worthwhile to separate this
> > from the conf location for flexibility. I can imagine wanting the keys
> > in a different location. One question becomes do we want ntp.keys to
> > follow ntpkeysdir or ntpconfdir?

Similar for NTP_KEYSDIR.

> > 4. Remove SAVENAME and LOCKNAME from sntp include file.
> >
> > Harlan, if you can put the mechanism into place to specify these in the
> > loc file and have them show up as macros in the config.h file, I can do
> > the rest.

bug 2179.

H


More information about the hackers mailing list