--- a/README Tue Feb 24 19:24:06 2015 +0200
+++ b/README Tue Feb 24 19:24:36 2015 +0200
@@ -8,10 +8,12 @@
The `pvl.hosts-* etc/hosts/test` tools read hosts files as input, which have an ini format, using section names as hostnames to configure attributes for that host:
[foo]
- ip = 127.0.0.1
+ ip = 127.0.0.1
+ ethernet = 00:11:22:33:44:55
[bar]
- ip = 127.0.0.2
+ ip = 127.0.0.2
+ ethernet = 01:23:45:67:89:ab
The default mechanism uses the basename of the given config file as the domain name, so this example file would generate something like the following output for use in a `zone "test" { ... }` zonefile:
@@ -25,6 +27,21 @@
1.0.0 PTR foo.test.
2.0.0 PTR bar.test.
+And the associated DHCP hosts:
+
+ $ bin/pvl.hosts-dhcp etc/hosts/test
+ host foo {
+ option host-name "foo";
+ hardware ethernet 00:11:22:33:44:55;
+ fixed-address 127.0.0.1;
+ }
+
+ host bar {
+ option host-name "bar";
+ hardware ethernet 01:23:45:67:89:ab;
+ fixed-address 127.0.0.2;
+ }
+
=== Generated hosts ===
The hosts file format supports something similar to bind9's $GENERATE directive for hosts:
--- a/etc/hosts/test Tue Feb 24 19:24:06 2015 +0200
+++ b/etc/hosts/test Tue Feb 24 19:24:36 2015 +0200
@@ -1,5 +1,7 @@
[foo]
- ip = 127.0.0.1
+ ip = 127.0.0.1
+ ethernet = 00:11:22:33:44:55
[bar]
- ip = 127.0.0.2
+ ip = 127.0.0.2
+ ethernet = 01:23:45:67:89:ab