[ntp:hackers] Replacement of hardcoded file paths.

Brian Utterback brian.utterback at oracle.com
Mon Aug 1 17:56:20 UTC 2011


On 08/01/11 13:27, Dave Hart wrote:
>> I am not sure about the last one though. The standard default for
>> > localstatedir is $(prefix)/var. I don't know how easy it would be to
>> > change the default.
> Difficult, I think, and ill-advised assuming you mean change the
> default value of a configure option that autoconf provides, as opposed
> to a NTP-specific configure option.  Can't we define NTP_VAR as
> ${localstatedir} and then you could override it with a configure
> option for the Solaris build?
> 

Don't get me wrong here. I don't want to change the current values that
these things take by default, I just want to be able to specify them one
a command line, either at configure time or compile time.

The issue I have with the /var one is that the default value for
localstatedir is $(prefix}/var, and the current value for NTP_VAR is
/var/NTP. This suggests that if we want to tie NTP_VAR to localstatedir,
then we either need to make NTP_VAR equal to $(localstatedir)/NTP or
make localstatedir equal to $(prefix)/var/NTP. If the former, then there
would be no way to initially make it configurable to any desired path.
If the latter then there potentially could be other effects down the
road if we ever incorporated something that expected localstatedir to
point to /var by default.

Another alternative would be to create a new path like "ntpstatedir" and
have it default to $(prefix)/var/NTP. That would likely be the cleanest
method, but I have no idea how to change the default of localstatedir or
create a new path. Any clues on either of those operations?

-- 
blu

Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. - Martin Golding
-----------------------------------------------------------------------|
Brian Utterback - Solaris RPE, Oracle Corporation.
Ph:603-262-3916, Em:brian.utterback at oracle.com


More information about the hackers mailing list