package/kernel: add another round of missing bits from [21137] & [21138] (oops again)
[openwrt.git] / package / dnsmasq / files / dnsmasq.init
index 47c4c2d..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/$ip"
-               [ -n "$raddr" ] && \
-                       append args "--ptr-record=$raddr,$name"
+               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.023254 seconds and 4 git commands to generate.