212 $ bin/pvl.hosts-reverse --hosts-include etc/hosts/ etc/zones/reverse/192.0.2/ |
212 $ bin/pvl.hosts-reverse --hosts-include etc/hosts/ etc/zones/reverse/192.0.2/ |
213 1 PTR foo.test. |
213 1 PTR foo.test. |
214 2 PTR bar.test. |
214 2 PTR bar.test. |
215 5 PTR quux.asdf.test. |
215 5 PTR quux.asdf.test. |
216 |
216 |
217 ## Usage |
217 ## Source zone files |
218 |
218 |
219 ### `bin/update` |
219 The zonefile header should be written out manually, using an `$INCLUDE` directive to reference the (generated) hosts zonefile: |
220 *update* reads host/zone file sources from `etc/`, and generates zonefiles/dhcp configs under `var/`. |
|
221 |
|
222 `update` will also shows and commits changes to `etc/` in any supported version-control system, and use commit timestamps for stable zone serials. |
|
223 |
|
224 -d DIR |
|
225 Do data operations under given dir-root, as opposed to CWD. |
|
226 |
|
227 -q |
|
228 Quiet. No log messages except errors. |
|
229 |
|
230 -vDV |
|
231 Increasing logging verbosity. |
|
232 |
|
233 -p |
|
234 Show diffs for changed output on stdout. |
|
235 |
|
236 -F |
|
237 Force-update output files, even if newer than input files. |
|
238 |
|
239 -S |
|
240 Do not generate new serials for zones. |
|
241 |
|
242 -d DIR |
|
243 Do data operations under given dir-root, as opposed to CWD. |
|
244 |
|
245 -q |
|
246 Quiet. No log messages except errors. |
|
247 |
|
248 -vDV |
|
249 Increasing logging verbosity. |
|
250 |
|
251 -p |
|
252 Show diffs for changed output on stdout. |
|
253 |
|
254 -F |
|
255 Force-update output files, even if newer than input files. |
|
256 |
|
257 -S |
|
258 Do not generate new serials for zones. |
|
259 |
|
260 -s |
|
261 Generate new serials for all zones. |
|
262 |
|
263 -n |
|
264 Fake-update; show changes, but don't actually commit/deploy them. |
|
265 |
|
266 Useful for testing. |
|
267 |
|
268 -C |
|
269 Do not commit source changes. |
|
270 |
|
271 -c |
|
272 Force-commit source changes, even though -n |
|
273 |
|
274 -m MSG |
|
275 Commit message for source changes; optional |
|
276 |
|
277 ## Output structure |
|
278 Generated file structure. |
|
279 |
|
280 ### `var/dhcp/` |
|
281 Generated dhcpd.conf fragments, loaded by dhcpd. |
|
282 |
|
283 ### `var/zones/` |
|
284 Generated zonefiles, loaded by bind. |
|
285 |
|
286 # *pvl-dns* |
|
287 Low-level zonefile utilities. |
|
288 |
|
289 ## `bin/pvl.dns-process` |
|
290 Process a zonefile to modify: |
|
291 |
|
292 * `SOA` record serial |
|
293 * `$INCLUDE` paths |
|
294 |
220 |
295 $ cat etc/zones/test |
221 $ cat etc/zones/test |
296 $TTL 3600 |
222 $TTL 3600 |
297 |
223 |
298 @ SOA foo.test. hostmaster.test. ( |
224 @ SOA foo.test. hostmaster.test. ( |
306 NS foo |
232 NS foo |
307 NS bar |
233 NS bar |
308 |
234 |
309 $INCLUDE "forward/test" |
235 $INCLUDE "forward/test" |
310 |
236 |
|
237 |
|
238 |
|
239 ## Usage |
|
240 |
|
241 ### `bin/update` |
|
242 *update* reads host/zone file sources from `etc/`, and generates zonefiles/dhcp configs under `var/`. |
|
243 |
|
244 `update` will also shows and commits changes to `etc/` in any supported version-control system, and use commit timestamps for stable zone serials. |
|
245 |
|
246 -d DIR |
|
247 Do data operations under given dir-root, as opposed to CWD. |
|
248 |
|
249 -q |
|
250 Quiet. No log messages except errors. |
|
251 |
|
252 -vDV |
|
253 Increasing logging verbosity. |
|
254 |
|
255 -p |
|
256 Show diffs for changed output on stdout. |
|
257 |
|
258 -F |
|
259 Force-update output files, even if newer than input files. |
|
260 |
|
261 -S |
|
262 Do not generate new serials for zones. |
|
263 |
|
264 -d DIR |
|
265 Do data operations under given dir-root, as opposed to CWD. |
|
266 |
|
267 -q |
|
268 Quiet. No log messages except errors. |
|
269 |
|
270 -vDV |
|
271 Increasing logging verbosity. |
|
272 |
|
273 -p |
|
274 Show diffs for changed output on stdout. |
|
275 |
|
276 -F |
|
277 Force-update output files, even if newer than input files. |
|
278 |
|
279 -S |
|
280 Do not generate new serials for zones. |
|
281 |
|
282 -s |
|
283 Generate new serials for all zones. |
|
284 |
|
285 -n |
|
286 Fake-update; show changes, but don't actually commit/deploy them. |
|
287 |
|
288 Useful for testing. |
|
289 |
|
290 -C |
|
291 Do not commit source changes. |
|
292 |
|
293 -c |
|
294 Force-commit source changes, even though -n |
|
295 |
|
296 -m MSG |
|
297 Commit message for source changes; optional |
|
298 |
|
299 ## Output structure |
|
300 Generated file structure. |
|
301 |
|
302 ### `var/dhcp/` |
|
303 Generated dhcpd.conf fragments, loaded by dhcpd. |
|
304 |
|
305 ### `var/zones/` |
|
306 Generated zonefiles, loaded by bind. |
|
307 |
|
308 # *pvl-dns* |
|
309 Low-level zonefile utilities. |
|
310 |
|
311 ## `bin/pvl.dns-process` |
|
312 Process a zonefile to modify: |
|
313 |
|
314 * `SOA` record serial |
|
315 * `$INCLUDE` paths |
|
316 |
311 $ bin/pvl.dns-process --serial $(date +%s) --include-path var/zones etc/zones/test |
317 $ bin/pvl.dns-process --serial $(date +%s) --include-path var/zones etc/zones/test |
312 $TTL 3600 |
318 $TTL 3600 |
313 @ SOA foo.test. hostmaster.test. 1425049088 1d 5m 10d 300 |
319 @ SOA foo.test. hostmaster.test. 1425049088 1d 5m 10d 300 |
314 NS foo |
320 NS foo |
315 NS bar |
321 NS bar |