From adedc8b276b5b7feab0c4e0f1fb3391d7dc3458d Mon Sep 17 00:00:00 2001 From: Travis Kemen Date: Thu, 20 Oct 2011 12:12:26 +0000 Subject: [PATCH] add cname section SVN-Revision: 28493 --- package/dnsmasq/files/dnsmasq.init | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index a0e893c5fd..3d9060d81d 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -364,6 +364,19 @@ dhcp_srv_add() { append args "-W $service" } +dhcp_cname_add() { + local cfg="$1" + local cname target + + config_get cname "$cfg" cname + [ -n "$cname" ] || return 0 + + config_get target "$cfg" target + [ -n "$target" ] || return 0 + + append args "--cname=${cname},${target}" +} + start() { include /lib/network scan_interfaces @@ -382,6 +395,7 @@ start() { config_foreach dhcp_domain_add domain config_foreach dhcp_srv_add srvhost config_foreach dhcp_add dhcp + config_foreach dhcp_cname_add cname /usr/sbin/dnsmasq $args && { rm -f /tmp/resolv.conf -- 2.30.2