README: example of update -n
authorTero Marttila <tero.marttila@aalto.fi>
Tue, 03 Mar 2015 13:05:13 +0200
changeset 726 8790e1e28661
parent 725 e8ede1a1e7b8
child 727 956fdb057cf0
README: example of update -n
README.md
--- a/README.md	Tue Mar 03 13:01:19 2015 +0200
+++ b/README.md	Tue Mar 03 13:05:13 2015 +0200
@@ -295,6 +295,41 @@
     isc-dhcp-server stop/waiting
     isc-dhcp-server start/running, process 775
 
+Use `-n` to enable noop mode and preview changes before updating:
+
+    sed -i s/quux/quux2/ etc/hosts/asdf.test && ./bin/update -C -n
+    Commit...
+      /home/tjmartti/pvl/pvl-hosts: skip commit
+    Using local unix time for uncommited changes: 1425380558
+    Updating forward host zones...
+      var/zones/forward/test: Generating forward hosts zone: etc/zones/forward/test
+            --- var/zones/forward/test      2015-03-03 12:55:53.480735624 +0200
+            +++ var/zones/forward/test.new  2015-03-03 13:02:38.708732551 +0200
+            @@ -2,2 +2,2 @@
+             bar                               A     192.0.2.2
+            -quux.asdf                         A     192.0.2.5
+            +quux22.asdf                       A     192.0.2.5
+    Updating reverse host zones...
+      var/zones/reverse/192.0.2: Generating reverse hosts zone: etc/zones/reverse/192.0.2
+            --- var/zones/reverse/192.0.2   2015-03-03 12:55:53.596735623 +0200
+            +++ var/zones/reverse/192.0.2.new       2015-03-03 13:02:38.832732550 +0200
+            @@ -2,2 +2,2 @@
+             2                                 PTR   bar.test.
+            -5                                 PTR   quux.asdf.test.
+            +5                                 PTR   quux22.asdf.test.
+    Updating DHCP hosts...
+    Copying zone includes...
+    Updating zones...
+    Updating DHCP confs...
+    Testing zones...
+    Reload zones...
+      Skip reload zones
+    Testing DHCP...
+    Reload DHCP...
+      Skip reload DHCP
+
+Note that noop mode does not yet handle dependency chains, i.e. you will not see which zones get updated serials without also using `-F`, which force-updates all output files regardless of dependency states.
+
 ## Output zone files
 
 The generated zone files can then be loaded by bind: