[ntp:questions] Finding out where ntpd gets its ntp.conf file

Unruh unruh-spam at physics.ubc.ca
Thu Sep 4 21:21:36 UTC 2008

David Woolley <david at ex.djwhome.demon.co.uk.invalid> writes:

>Steve Kostecke wrote:
>> On 2008-09-03, Joseph Gwinn <joegwinn at comcast.net> wrote:
>>> Read the "service" shell script.  It appears to get its file paths from 
>>> environment variables named after the thing being started and stopped 
>>> and accessible only in the root environment; this bit of RHEL-specific 
>>> structure is being chased down.  (Does anyone know where this is 
>>> documented?)
>> On Linux OSes init scripts are typically found in /etc/init.d/ or
>> /etc/rc.d/init.d/ Look for one named ntp (or something containing ntp).
>I believe service is just a front end to those scripts, so I presume 


>that, by "service shell scripts" he is referring to those scripts.  The 
>problem he is having is that they probably source files (bash . command) 
>files containing shell variable definitions from the master 

Very rarely. those files tend to be pretty self contained from what I have
seen with some sourcing of common functions. Since those files are already
set up by the distrution, there is no need to then put extra stuff into
some obscure gui file, especially since they are also run from console
bootup sessions. 

The /etc/init.d/ntpd file is the one taht starts up ntpd. That is where I
would look first for any weird ntp config file. 
Then if it is not obvious there, look to see if there is some sourceing of
other files and look in there. 

service runs those files.  It does not display them. 

>configuration directory, maintained by the, typically GUI, configuration 
>tools.  I suspect he hasn't realised that is is sourcing thesse files.

>Note that not all Linux distributions use this style of startup script, 
>some are based one a more historical style of /etc/rc.

Agreed. He said redhat however which does have /etc/init.d/ as the startup
files. Obviously Windows does not. 

More information about the questions mailing list