From owner-freebsd-stable@FreeBSD.ORG Fri May 13 12:40:32 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2487D16A4CE for ; Fri, 13 May 2005 12:40:32 +0000 (GMT) Received: from www.provisio.net (paco.to [209.31.146.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9826143D48 for ; Fri, 13 May 2005 12:40:31 +0000 (GMT) (envelope-from paco@paco.to) Received: from www.provisio.net (localhost [127.0.0.1]) by www.provisio.net id j4DCeSH7029391 envelope-from paco@paco.to for ; Fri, 13 May 2005 08:40:28 -0400 (EDT) (envelope-from paco@paco.to) Received: from localhost (paco@localhost)j4DCeRe4029388 for ; Fri, 13 May 2005 08:40:28 -0400 (EDT) (envelope-from paco@paco.to) X-Authentication-Warning: www.provisio.net: paco owned process doing -bs Date: Fri, 13 May 2005 08:40:27 -0400 (EDT) From: Paco Hope X-X-Sender: paco@www.provisio.net To: freebsd-stable@freebsd.org In-Reply-To: <20050513092809.GA314@grummit.biaix.org> Message-ID: <20050513082747.V26607@www.provisio.net> References: <20050513012244.GA67227@flash.atmos.colostate.edu> <20050513092809.GA314@grummit.biaix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Provisio-MailScanner-Information: Contact Paco Hope phone: 703-606-1905 X-Provisio-MailScanner: Judged to be clean X-MailScanner-From: paco@paco.to Subject: Re: Using jails and djbdns X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 12:40:32 -0000 On Fri, 13 May 2005, Joan Picanyol i Puig wrote: > * Tony Arcieri [20050513 03:21]: > > Is there some easy way to reverse this order, so svscan is started first and > > jails started afterward? > > Follow the author's instructions, and put this line into /etc/rc.local: > > csh -cf '/command/svscanboot &' I don't think any of the suggestions so far are going to do it. The reason is this: both /etc/rc.local and all things in /usr/local/etc/rc.d will be executed after the builtin logid for launching jails is executed. The problem here is that if you use the standard /etc/rc.conf means for launching jails, (take a look at /etc/defaults/rc.conf for an example), the jail commands will be executed first. The last thing /etc/rc does is invoke /etc/rc.local and all the /usr/local/etc/rc.d scripts. His problem is that he needs DNS up *before* the jail commands run. Here's a hackish way to do it that might work. 1. Move the /usr/local/etc/rc.d/svscan.sh script out of /usr/local/etc/rc.d. Maybe put it in /usr/local/etc. Just put it somewhere where it won't get executed automatically. 2. Put the following lines in /etc/rc.conf named_enable="YES" named_program="/usr/local/etc/svscan.sh" # (if this is where you put it) named_flags="start" unset named_chrootdir # defeat some built-in BIND-oriented logic unset named_chroot_autoupdate # ditto The logic built into /etc/rc launches DNS before jails. By hijacking the "named" flags and using them for DJB, you should be able to get DJB to launch at the appropriate time. Good luck. Paco