summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2011-10-20 12:12:26 +0000
committerTravis Kemen <thepeople@openwrt.org>2011-10-20 12:12:26 +0000
commitfce837994043793008be610cb24154d649c7b190 (patch)
treea0a081b5140c5cce50346556193df4f9c5f88598
parent40d088446fd218993fe9d56233b1f80701e7d0ae (diff)
downloadmtk-20170518-fce837994043793008be610cb24154d649c7b190.zip
mtk-20170518-fce837994043793008be610cb24154d649c7b190.tar.gz
mtk-20170518-fce837994043793008be610cb24154d649c7b190.tar.bz2
add cname section
SVN-Revision: 28493
-rw-r--r--package/dnsmasq/files/dnsmasq.init14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index a0e893c..3d9060d 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