[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rcS directory



On Mon, 11 Aug 2003 13:01:39 +0200
Rudy Gevaert <rudy@zeus.UGent.be> wrote:

> I noticed that when my server gets rebooted the /etc/init.d/ntpdate
> script doesn't get run.
> 
> Even though there is a symlink to it in the rcS.d directory.
> 
> Where can I see that the rcS.d directory gets called?  So I am sure
> all the scripts in there get run.  (I'm actually nearly sure some
> don't as ntpd doesn't get run).


You can't see that "the rcS.d directory gets called", but you can tell when
those scripts are being run by the console messages.

For example, "Checking all filesystems ..." tells you S20checkfs.sh is
running, and "Mounting local filesystems ..." is the message from
S35mountall.sh.

"Setting the System Clock using the Hardware Clock as a reference ..." is
for hwclock.sh (I changed its number on my system). The very next message
should be "Running ntpdate to synchronize clock." (The period at the end
indicates the command finished.) It is easy to miss.

Looking at the ntpdate script in /etc/init.d, I noted that ntpdate is called
with several options. The -s option redirects output to syslog, but syslog
isn't started until after all the scripts in rcS.d are run and the system
changes to runlevel 2.

So I replaced -s with -v, and now I get a message on the console telling me
how much the time was adjusted.

Kevin



Reply to: