From owner-freebsd-rc@FreeBSD.ORG Wed Mar 7 20:38:05 2012 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B0B106564A for ; Wed, 7 Mar 2012 20:38:05 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from mail.mroute.net (lax-gw12.mailroute.net [199.89.0.112]) by mx1.freebsd.org (Postfix) with ESMTP id B3B778FC1A for ; Wed, 7 Mar 2012 20:38:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lax-gw12.mroute.net (Postfix) with ESMTP id 774CC3270BEF for ; Wed, 7 Mar 2012 20:18:25 +0000 (UTC) X-Virus-Scanned: by MailRoute Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by lax-gw12.mroute.net (Postfix) with ESMTP id A691B3270BEC for ; Wed, 7 Mar 2012 20:18:24 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id A193516DA; Wed, 7 Mar 2012 12:18:24 -0800 (PST) From: merlyn@stonehenge.com (Randal L. Schwartz) To: rc@freebsd.org x-mayan-date: Long count = 12.19.19.3.11; tzolkin = 1 Chuen; haab = 19 Kayab Date: Wed, 07 Mar 2012 12:18:24 -0800 Message-ID: <86r4x4dv1r.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: need a shim between postgresql and pgpool startup X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:38:05 -0000 [not on list... please keep me cc'ed] Apparently, the postgresql start returns before postgresql is fully "warmed up". The next thing I start is pgpool, and pgpool aborts if it can't connect to postgres. What would the best way be to insert a 2 second delay between the two starts, or better yet, ensure pg was up before pgpool started, *without* editing the rc.d file from either of the ports (I hate having local mods like that). I'm thinking of adding some sort of pgpool_startpre, or maybe a shim that uses requires postgresql and before pgpool. Can I put pgpool_startpre() in my rc.conf file? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion