Re: rc script timing issues?

2004-03-10 Thread Peter Risdon
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.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: rc script timing issues?

2004-03-10 Thread Peter Risdon
Peter Risdon wrote:

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.
One small note - the startup script for mysql-client is prefixed with 
000. but the one for mysql-server is not prefixed by a numeral. The 
mysql client has to start before the server. You'll need to prefix 
mysql-server.sh with a numeral but it must be  000.

PWR.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: rc script timing issues?

2004-03-10 Thread Remko Lodder
I thought that under /usr/local/etc/rc.d every starts alphabetically (weird
word :P)
so you could try and start the mysql package as a_mysql.sh or something so
that it is processed earlier on, i have exactly the same issue, my
webservers etc all come up {using SQL, but SQL is started later on, even the
ldconfig hasn't been done yet at that stage, so he
cant find the libraries and so on, causing my mailserver to fail as well }

So, you could try that {did not check it yet myself}

Cheers

--

Kind regards,

Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl Dutch community for helping newcomers on the
hackerscene

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Shaun T. Erickson
Verzonden: woensdag 10 maart 2004 5:26
Aan: [EMAIL PROTECTED]
Onderwerp: rc script timing issues?


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.

-ste

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: rc script timing issues?

2004-03-10 Thread Shaun T. Erickson
Peter Risdon wrote:

 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.
This was exactly the solution I needed and, per your later email, I also 
made sure the client script runs first.

	-ste

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]