README.md
changeset 727 956fdb057cf0
parent 726 8790e1e28661
child 728 d3cea9988848
equal deleted inserted replaced
726:8790e1e28661 727:956fdb057cf0
   328     Reload DHCP...
   328     Reload DHCP...
   329       Skip reload DHCP
   329       Skip reload DHCP
   330 
   330 
   331 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.
   331 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.
   332 
   332 
       
   333 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`:
       
   334 
       
   335     $ sed -i s/quux/quux2/ etc/hosts/asdf.test && ./bin/update -m "rename quux to quux2" -p
       
   336     Commit...
       
   337       /home/tjmartti/pvl/pvl-hosts: commit: rename quux to quux2
       
   338         diff -r 8790e1e28661 etc/hosts/asdf.test
       
   339         --- a/etc/hosts/asdf.test   Tue Mar 03 13:05:13 2015 +0200
       
   340         +++ b/etc/hosts/asdf.test   Tue Mar 03 13:06:03 2015 +0200
       
   341         @@ -1,2 +1,2 @@
       
   342         -[quux]
       
   343         +[quux2]
       
   344              ip  = 192.0.2.5
       
   345     Using commit timestamp: 1425380763
       
   346     Updating forward host zones...
       
   347       var/zones/forward/test: Generating forward hosts zone: etc/zones/forward/test
       
   348             --- var/zones/forward/test      2015-03-03 13:04:09.556731909 +0200
       
   349             +++ var/zones/forward/test.new  2015-03-03 13:06:04.260731122 +0200
       
   350             @@ -2,2 +2,2 @@
       
   351              bar                               A     192.0.2.2
       
   352             -quux22.asdf                       A     192.0.2.5
       
   353             +quux2.asdf                        A     192.0.2.5
       
   354     Updating reverse host zones...
       
   355       var/zones/reverse/192.0.2: Generating reverse hosts zone: etc/zones/reverse/192.0.2
       
   356             --- var/zones/reverse/192.0.2   2015-03-03 13:04:09.684731908 +0200
       
   357             +++ var/zones/reverse/192.0.2.new       2015-03-03 13:06:04.384731122 +0200
       
   358             @@ -2,2 +2,2 @@
       
   359              2                                 PTR   bar.test.
       
   360             -5                                 PTR   quux22.asdf.test.
       
   361             +5                                 PTR   quux2.asdf.test.
       
   362     Updating DHCP hosts...
       
   363     Copying zone includes...
       
   364     Updating zones...
       
   365       var/serials/test: Update serial: 1425380649 <- 1425380763
       
   366       var/zones/test: Generate zone: etc/zones/test @ 1425380763
       
   367             --- var/zones/test      2015-03-03 13:04:09.812731907 +0200
       
   368             +++ var/zones/test.new  2015-03-03 13:06:04.512731121 +0200
       
   369             @@ -1,3 +1,3 @@
       
   370              $TTL   3600
       
   371             -@                                 SOA   foo.test. hostmaster.test. 1425380649 1d 5m 10d 300
       
   372             +@                                 SOA   foo.test. hostmaster.test. 1425380763 1d 5m 10d 300
       
   373                                                NS    foo
       
   374     Updating DHCP confs...
       
   375     Testing zones...
       
   376     Reload zones...
       
   377       Reload zones
       
   378      * Reloading domain name service... bind9 [ OK ] 
       
   379     Testing DHCP...
       
   380     Reload DHCP...
       
   381       Reload DHCP
       
   382     isc-dhcp-server stop/waiting
       
   383     isc-dhcp-server start/running, process 2839
       
   384 
       
   385 
   333 ## Output zone files
   386 ## Output zone files
   334 
   387 
   335 The generated zone files can then be loaded by bind:
   388 The generated zone files can then be loaded by bind:
   336 
   389 
   337     $ cat var/zones/test 
   390     $ cat var/zones/test