Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2004 08:23:19 +0000
From:      Peter Risdon <peter@circlesquared.com>
To:        "Shaun T. Erickson" <ste@ste-land.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: rc script timing issues?
Message-ID:  <404ED077.50407@circlesquared.com>
In-Reply-To: <404E98CB.6060203@ste-land.com>
References:  <404E98CB.6060203@ste-land.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Shaun T. Erickson wrote:

> On 5.2.1-RELEASE-p1, in /usr/local/etc/rc.d, I have scripts that start 
> my MySQL database, and that start my Courier-IMAP daemons. When the 
> scripts for courier run, one of the first things they do is start 
> authdaemond, which should fire up several authdaemond.mysql processes 
> and then they start the imap daemons.
>
> On reboot, the imap daemons are running, but the authdaemond.mysql 
> processes aren't. If I stop the imap script, and re-run it, everything 
> starts up just fine.
>
> I suspect that the database isn't getting started before the imap 
> scripts are run. So, I moved the database startup script to /etc/rc.d, 
> but on reboot, the database wasn't started. I had hoped moving it to 
> /etc/rc.d might start it earlier in the boot process.
>
> Suggestions? TIA.

 From man 8 rc.d:

         The scripts within each directory are executed in lexicographical
         order.  If a specific order is required, numbers may be used as a
         prefix to the existing filenames, so for example 100.foo would be
         executed before 200.bar; without the numeric prefixes the opposite
         would be true.

You might be able to see this if you've installed, say, mysql-client 
which uses a script in /usr/local/etc/rc.d called 000.mysql-client.sh - 
the 000. forces an early startup. So I suggest you're better off moving 
the scripts back to /usr/local/etc/rc.d and prefixing them with numerals 
to get the startup order correct.

PWR.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?404ED077.50407>