From b55a47510f9f3daf53dfcde27ee102adf442593d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 27 May 2013 09:48:44 +0200 Subject: Initial import --- 21-pdnsd | 20 ++++++++++++++++++++ pdnsd.conf.dhcpcd-hook | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 21-pdnsd create mode 100644 pdnsd.conf.dhcpcd-hook diff --git a/21-pdnsd b/21-pdnsd new file mode 100644 index 0000000..0ce2033 --- /dev/null +++ b/21-pdnsd @@ -0,0 +1,20 @@ +#!/bin/sh + +case "${reason}" in + BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) + # Set the IP of "dynamic" entry for pdnsd + SRVS="" + for X in ${new_domain_name_servers}; do + if [ -z "${SRVS}" ]; then + SRVS="${X}" + else + SRVS="${SRVS},${X}" + fi + done + pdnsd-ctl server dynamic up ${SRVS} + ;; + PREINIT|EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP) + # reset to values in /etc/pdnsd.conf + pdnsd-ctl config + ;; +esac diff --git a/pdnsd.conf.dhcpcd-hook b/pdnsd.conf.dhcpcd-hook new file mode 100644 index 0000000..5e593f7 --- /dev/null +++ b/pdnsd.conf.dhcpcd-hook @@ -0,0 +1,10 @@ +server { + label = "dynamic"; + # no ip address definition here, this is just a placeholder + proxy_only = off; + lean_query = on; + timeout = 4; + uptest = none; + root_server = off; + purge_cache = off; +} -- cgit v1.2.3-54-g00ecf