From owner-freebsd-questions@FreeBSD.ORG Fri Jul 13 20:11:55 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 76EC616A400 for ; Fri, 13 Jul 2007 20:11:55 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from eskimo.tundraware.com (eskimo.tundraware.com [66.92.130.161]) by mx1.freebsd.org (Postfix) with ESMTP id 07FC913C494 for ; Fri, 13 Jul 2007 20:11:54 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (ozzie.tundraware.com [66.92.130.199]) (authenticated bits=0) by eskimo.tundraware.com (8.14.1/8.14.1) with ESMTP id l6DKBeF2095944 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Fri, 13 Jul 2007 15:11:41 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <4697DC7E.7000809@tundraware.com> Date: Fri, 13 Jul 2007 15:11:42 -0500 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Alex Zbyslaw References: <468972C5.9090902@tundraware.com> <200707021722.05724.josh@tcbug.org> <4697A498.5000501@tundraware.com> <4697AE4C.8070909@dial.pipex.com> In-Reply-To: <4697AE4C.8070909@dial.pipex.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-tundraware.com-MailScanner-Information: Please contact the ISP for more information X-tundraware.com-MailScanner: Found to be clean X-tundraware.com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 1, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-tundraware.com-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: Finally Converting From Bind 8 -> Bind 9 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: tundra@tundraware.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 20:11:55 -0000 Alex Zbyslaw wrote: > Tim Daneliuk wrote: > >> 2) Better still is there some sort of "include" mechanism where I could >> keep a flat file of public host information for use by db.external, >> but include it into db.internal. > > I don't think there is, but let someone who uses bind more than I do > give a definitive on that :-) > > What you *can* do, irrespective of bind version, is to have two files > which you pre-process with m4, and have a third file which m4 includes > on both the others. > > So you start with: > > internal.M4 which includes "shared" > external.M4 which also includes "shared" > shared which gets included in the other two. > > Then m4 internal.M4 > internal and m4 external.M4 -> external. > > Bind then loads internal and external. A reasonable and very Unix-ish solution, certainly. Though, I think the subsequent post on this thread regarding $INCLUDE is probably more elegant ;) > > Alternatively you could start with one M4 file which uses lots of ifdefs > for the non-shared portions. The create internal and external by > specifying different definitions to m4. e.g. m4 -D _TYPE=EXTERNAL or m4 > -D _TYPE=INTERNAL. > > For a problem with small differences between two files, this is a better > solution, but not what I'd do in this case. Me either - conditional content gets clumsy to maintain in a big hurry. > > Whole process can be easily controlled with a Makefile (including any > restarts). > > --Alex > > -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/