summaryrefslogtreecommitdiffstats
path: root/21-pdnsd
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-05-27 09:48:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-05-27 09:48:44 +0200
commitb55a47510f9f3daf53dfcde27ee102adf442593d (patch)
treee4e827fde2c55aa0e6be3cd23300f0c06f59cef1 /21-pdnsd
parent2ca3f57b0986f289dc6a5aa36418d18963d3a180 (diff)
downloaddhcpcd-hook-pdnsd-0.1.0.tar.gz
dhcpcd-hook-pdnsd-0.1.0.tar.zst
Initial import0.1.0
Diffstat (limited to '21-pdnsd')
-rw-r--r--21-pdnsd20
1 files changed, 20 insertions, 0 deletions
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