From e83cb954a3a697d08e18c94531ad9bfccc9d1015 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 3 Dec 2011 19:24:10 +0000 Subject: [PATCH] bin/zoneconf: Write a reminder about how the various views work. Organization: Straylight/Edgeware From: Mark Wooding I keep forgetting. --- bin/zoneconf | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/bin/zoneconf b/bin/zoneconf index 8e0646d..820f62f 100755 --- a/bin/zoneconf +++ b/bin/zoneconf @@ -980,6 +980,24 @@ define-configuration-space zone ZONECFG { } define view-map {map} { + + ## OK, this needs careful documentation. + ## + ## The local nameserver presents a number of views according to its + ## configuration. It is our purpose here to generate a configuration + ## snippet for such a view. + ## + ## A user might have several different views of a zone which are meant to + ## be presented to different clients. These map on to the server views + ## in a one-to-many fashion. The `view-map' option defines this mapping. + ## The argument is a list of alternating SERVER-VIEW USER-VIEW pairs; the + ## SERVER-VIEW may be a glob pattern; the USER-VIEW may be the special + ## token `=' to mean `same as the SERVER-VIEW'. + ## + ## We only keep one copy of the zone file for each user view: if the user + ## view is used by many server views, then the zone stanza for each of + ## those views refers to the same zone file. + if {[llength $map] % 2} { error "view map must have an even number of items" } @@ -1041,7 +1059,7 @@ proc output-file-name {view} { proc compute-zone-properties {view config} { ## Derive interesting information from the zone configuration plist CONFIG, - ## relative to the stated VIEW. Return a new plist. + ## relative to the stated server VIEW. Return a new plist. array set zone $config -- [mdw]