--- a/README.md Tue Mar 03 13:05:13 2015 +0200
+++ b/README.md Tue Mar 03 13:07:17 2015 +0200
@@ -330,6 +330,59 @@
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.
+Finally, the default operation mode of update is to commit any changes, and update the zones using the commit timestamp as a serial. Use the `-p` flag to show output diffs as with `-n`:
+
+ $ sed -i s/quux/quux2/ etc/hosts/asdf.test && ./bin/update -m "rename quux to quux2" -p
+ Commit...
+ /home/tjmartti/pvl/pvl-hosts: commit: rename quux to quux2
+ diff -r 8790e1e28661 etc/hosts/asdf.test
+ --- a/etc/hosts/asdf.test Tue Mar 03 13:05:13 2015 +0200
+ +++ b/etc/hosts/asdf.test Tue Mar 03 13:06:03 2015 +0200
+ @@ -1,2 +1,2 @@
+ -[quux]
+ +[quux2]
+ ip = 192.0.2.5
+ Using commit timestamp: 1425380763
+ Updating forward host zones...
+ var/zones/forward/test: Generating forward hosts zone: etc/zones/forward/test
+ --- var/zones/forward/test 2015-03-03 13:04:09.556731909 +0200
+ +++ var/zones/forward/test.new 2015-03-03 13:06:04.260731122 +0200
+ @@ -2,2 +2,2 @@
+ bar A 192.0.2.2
+ -quux22.asdf A 192.0.2.5
+ +quux2.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 13:04:09.684731908 +0200
+ +++ var/zones/reverse/192.0.2.new 2015-03-03 13:06:04.384731122 +0200
+ @@ -2,2 +2,2 @@
+ 2 PTR bar.test.
+ -5 PTR quux22.asdf.test.
+ +5 PTR quux2.asdf.test.
+ Updating DHCP hosts...
+ Copying zone includes...
+ Updating zones...
+ var/serials/test: Update serial: 1425380649 <- 1425380763
+ var/zones/test: Generate zone: etc/zones/test @ 1425380763
+ --- var/zones/test 2015-03-03 13:04:09.812731907 +0200
+ +++ var/zones/test.new 2015-03-03 13:06:04.512731121 +0200
+ @@ -1,3 +1,3 @@
+ $TTL 3600
+ -@ SOA foo.test. hostmaster.test. 1425380649 1d 5m 10d 300
+ +@ SOA foo.test. hostmaster.test. 1425380763 1d 5m 10d 300
+ NS foo
+ Updating DHCP confs...
+ Testing zones...
+ Reload zones...
+ Reload zones
+ * Reloading domain name service... bind9 [ OK ]
+ Testing DHCP...
+ Reload DHCP...
+ Reload DHCP
+ isc-dhcp-server stop/waiting
+ isc-dhcp-server start/running, process 2839
+
+
## Output zone files
The generated zone files can then be loaded by bind: