avoid syncronising clock and how to dial-up

Neil Woolford neil at neilwoolford.co.uk
Sat Dec 4 17:09:13 UTC 2004


At 16:13 04/12/04, you wrote:

>Neil Woolford wrote:
>
>>
>>
>>The script that calls for the update is /etc/init.d/ntpdate.  This is 
>>called as part of the later stages of the general boot process by a link 
>>from /etc/rcS.d/S51ntpdate.
>>
>>The are differing views about how to disable such a process...
>>
>I have a similar problem.  I don't want to disable the ntp sync, just 
>delay it.  I use adsl and it connects at boot, but for some reason the 
>sync attempt occurs before the adsl connection is established.  How can I 
>fix this?

This is getting to the edges of my understanding, so check before you do 
anything based on it;

Ubuntu (and Debian) use what is known as a System V boot system, where a 
lot of small scripts to set things up are
stored in /etc/init.d.  The scripts are written to accept parameters, 
notably 'start' and 'kill' to start and stop processes.

The scripts are called via links in a series of directories /etc/rc?.d 
where ? is either a capital S or a number representing
a run-level.  The directory rcS.d contains links to scripts that are run at 
boot before the run-level is selected, rc2.d (for example)
contains links to scripts in /etc/init.d that are needed for run-level 2.

Now the bit that counts for determining the order in which things run, 
which is what interests us to solve your problem.

rcS.d is always run first, followed by the appropriate rc?.d file for the 
run-level being entered.  Within the rc?.d directories there is
a strict naming convention;  files start with either an S (start) or a K 
(kill) and a two digit number followed by the rest of the filename.
(Such as S51ntpdate.)  The links are activated in  the order of these numbers.

ntpsync is called from rcS.d which is right at the start of the 
process.  You probably want to deactivate (rename with an underscore
at the start) that first instance.  Then you'll have to search for the link 
that sets up the adsl connection, which will be in one of
the rc?.d directories;  in principle, if you add a (symbolic) link to call 
ntpdate in the form S??ntpdate where ?? are a two digit number
higher than that of the script which starts adsl, you will get the desired 
startup order.

I haven't tried this though, as I use dialup.  All I've done is disable the 
link to ntpdate as I don't want it called at all.

Hope this helps some.

Neil
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 19/11/04


More information about the ubuntu-users mailing list