unbound: add odhcpd specific scripts to link DHCP-DNS
authorEric Luehrsen <redacted>
Thu, 29 Dec 2016 06:29:17 +0000 (01:29 -0500)
committerEric Luehrsen <redacted>
Mon, 23 Jan 2017 01:53:04 +0000 (20:53 -0500)
commitc7684b9f70d2f5370daee62363dbe65bfced6b80
tree5ebdc12b79929a1ab43fb5cd0c1ae2ef21a43f18
parentee8b15cad2f43e626df62e9d567b0ef09fa682cb
unbound: add odhcpd specific scripts to link DHCP-DNS

The UCI for Unbound already links to dnsmasq, but what
if with Unbound, we want to configure a plain dhcp server.
Most servers can call a script for lease events. That
script can then formulate DNS records and load them
with unbound-control (dependency).

The files added here work with OpenWRT/LEDE odhcpd, such
that it can be run alone. They can be used as examples
for any dhcp server. 'odhcpd.sh' is to be called by
odhcpd when a lease event occurs. 'odhcpd.awk' is called
internal to the shell script. The awk script handles
any tricky reformating that may be required.

/etc/config/dhcp
config odhcpd 'odhcpd'
  option leasetrigger '/usr/lib/unbound/odhcpd.sh'

Signed-off-by: Eric Luehrsen <redacted>
net/unbound/files/odhcpd.awk [new file with mode: 0644]
net/unbound/files/odhcpd.sh [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT