README: better ./update docs
authorTero Marttila <tero.marttila@aalto.fi>
Fri, 27 Feb 2015 17:06:54 +0200
changeset 646 585fe8171ac6
parent 645 0467e1464cca
child 647 90a0790adf8a
README: better ./update docs
README.md
--- a/README.md	Fri Feb 27 17:05:08 2015 +0200
+++ b/README.md	Fri Feb 27 17:06:54 2015 +0200
@@ -234,76 +234,45 @@
 
     $INCLUDE "forward/test"
 
-
-
-## Usage
-
-### `bin/update`
-*update* reads host/zone file sources from `etc/`, and generates zonefiles/dhcp configs under `var/`.
-
-`update` will also shows and commits changes to `etc/` in any supported version-control system, and use commit timestamps for stable zone serials.
-
-    -d DIR
-        Do data operations under given dir-root, as opposed to CWD.
-
-    -q
-        Quiet. No log messages except errors.
-
-    -vDV
-        Increasing logging verbosity.
-
-    -p
-        Show diffs for changed output on stdout.
-
-    -F
-        Force-update output files, even if newer than input files.
-
-    -S
-        Do not generate new serials for zones.
-
-    -d DIR
-        Do data operations under given dir-root, as opposed to CWD.
-
-    -q
-        Quiet. No log messages except errors.
+## Operation
 
-    -vDV
-        Increasing logging verbosity.
-
-    -p
-        Show diffs for changed output on stdout.
-
-    -F
-        Force-update output files, even if newer than input files.
-
-    -S
-        Do not generate new serials for zones.
-
-    -s
-        Generate new serials for all zones.
-
-    -n
-        Fake-update; show changes, but don't actually commit/deploy them.
+Use the *update* script to generate a complete set of output zonefiles:
 
-        Useful for testing.
-
-    -C
-        Do not commit source changes.
-
-    -c
-        Force-commit source changes, even though -n
+    $ ./bin/update
+    Commit...
+    Using commit timestamp: 1425049508
+    Updating forward host zones...
+      var/zones/forward/test: Generating forward hosts zone: etc/zones/forward/test/
+    Updating reverse host zones...
+      var/zones/reverse/192.0.2: Generating reverse hosts zone: etc/zones/reverse/192.0.2/
+    Updating DHCP hosts...
+    Copying zone includes...
+    Updating zones...
+      var/serials/test: Update serial: 1425049508 <- 1425049508
+      var/zones/test: Generate zone: etc/zones/test
+    Updating DHCP confs...
+    Testing zones...
+    Reload zones...
+      Reload zones
+            rndc: server reload successful
+    Testing DHCP...
+    Reload DHCP...
 
-    -m MSG
-        Commit message for source changes; optional
+## Output zone files
 
-## Output structure
-Generated file structure.
+The generated zone files can then be loaded by bind:
 
-### `var/dhcp/`
-Generated dhcpd.conf fragments, loaded by dhcpd.
+    $ cat var/zones/test 
+    $TTL    3600
+    @                                 SOA   foo.test. hostmaster.test. 1425049508 1d 5m 10d 300
+                                      NS    foo
+                                      NS    bar
+    $INCLUDE        "./var/zones/forward/test"
 
-### `var/zones/`
-Generated zonefiles, loaded by bind.
+    $ cat var/zones/forward/test 
+    foo                               A     192.0.2.1
+    bar                               A     192.0.2.2
+    quux.asdf                         A     192.0.2.5
 
 # *pvl-dns*
 Low-level zonefile utilities.