diff options
author | thepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-10-20 12:12:26 +0000 |
---|---|---|
committer | thepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-10-20 12:12:26 +0000 |
commit | 0f5bb7640c056f27796eb5428770113073742b17 (patch) | |
tree | 281566f40e09ba13c53015948f3e2a0df666ffa8 | |
parent | ad05c9925313bccdb86c0305f72dd2188d8231fe (diff) |
add cname section
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28493 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/dnsmasq/files/dnsmasq.init | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index a0e893c5f..3d9060d81 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 |