[ifxmips] update Makefile
[openwrt.git] / package / dnsmasq / files / dnsmasq.init
index 4cd941c..15f856d 100644 (file)
@@ -296,9 +296,17 @@ dhcp_domain_add() {
        local raddr="${4:+$4.$3.$2.$1.in-addr.arpa}"
 
        for name in $names; do
-               append args "-A /$name${DOMAIN:+.$DOMAIN}/$ip"
-               [ -n "$raddr" ] && \
-                       append args "--ptr-record=$raddr,$name${DOMAIN:+.$DOMAIN}"
+               local fqdn="$name"
+
+               [ "${fqdn%.*}" == "$fqdn" ] && \
+                       fqdn="$fqdn${DOMAIN:+.$DOMAIN}"
+
+               append args "-A /$fqdn/$ip"
+               
+               [ -n "$raddr" ] && {
+                       append args "--ptr-record=$raddr,$fqdn"
+                       raddr=""
+               }
        done
 }
 
This page took 0.021425 seconds and 4 git commands to generate.