diff options
Diffstat (limited to 'package/network/services')
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index c2704e4b9a..06d8c840fb 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -293,6 +293,11 @@ dhcp_host_add() { config_get ip "$cfg" ip [ -n "$ip" -o -n "$name" ] || return 0 + config_get_bool dns "$cfg" dns 0 + [ "$dns" = "1" -a -n "$ip" -a -n "$name" ] && { + echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE + } + config_get mac "$cfg" mac [ -z "$mac" ] && { [ -n "$name" ] || return 0 @@ -309,11 +314,6 @@ dhcp_host_add() { [ "$broadcast" = "0" ] && broadcast= xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}" - - config_get_bool dns "$cfg" dns 0 - [ "$dns" = "1" ] && { - echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE - } } dhcp_tag_add() { |