From owner-freebsd-questions@FreeBSD.ORG Tue Nov 18 11:24:57 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59F751065673 for ; Tue, 18 Nov 2008 11:24:57 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2D97C8FC25 for ; Tue, 18 Nov 2008 11:24:56 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id BAAB4AFC1C6; Tue, 18 Nov 2008 02:24:55 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Tue, 18 Nov 2008 12:24:29 +0100 User-Agent: KMail/1.9.7 References: <1E519418-C8C4-4DD5-BFDC-F95158DA097E@todoo.biz> In-Reply-To: <1E519418-C8C4-4DD5-BFDC-F95158DA097E@todoo.biz> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200811181224.29669.fbsd.questions@rachie.is-a-geek.net> Cc: Subject: Re: Delay startup of services in rc.conf || elswhere X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2008 11:24:57 -0000 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=85 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=85 > > > How can I do that? There's no standard support for this. You will have to modify the script in= =20 (/usr/local)/etc/rc.d/ for that service, specifically the ${name}_start=20 function. You will however have to do this with each update, so it is=20 generally better to contact the author of the service that depends on MySQL= ,=20 to more gracefully start up: if the connection can't be made that it tries= =20 again until it does (maybe with a max_retries setting). This is very trivia= l=20 stuff in daemons. =2D-=20 Mel Problem with today's modular software: they start with the modules and never get to the software part.