Date: Tue, 18 Nov 2008 12:24:29 +0100 From: Mel <fbsd.questions@rachie.is-a-geek.net> To: freebsd-questions@freebsd.org Subject: Re: Delay startup of services in rc.conf || elswhere Message-ID: <200811181224.29669.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <1E519418-C8C4-4DD5-BFDC-F95158DA097E@todoo.biz> References: <1E519418-C8C4-4DD5-BFDC-F95158DA097E@todoo.biz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 18 November 2008 12:05:33 bsd wrote:
> Hello,
>
>
> I have a server configured to start 10 services at startup (in /etc/
> rc.conf)
>
> Unfortunately, the startup of MySQL seems to be returning "ok" before
> It actually has started completely the program… the next program rely
> on MySQL and does not start well because the database is not "fully"
> started.
>
> I would like to introduce something like a "sleep 10" timer in the
> service startup process…
>
>
> How can I do that?
There's no standard support for this. You will have to modify the script in
(/usr/local)/etc/rc.d/ for that service, specifically the ${name}_start
function. You will however have to do this with each update, so it is
generally better to contact the author of the service that depends on MySQL,
to more gracefully start up: if the connection can't be made that it tries
again until it does (maybe with a max_retries setting). This is very trivial
stuff in daemons.
--
Mel
Problem with today's modular software: they start with the modules
and never get to the software part.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811181224.29669.fbsd.questions>
