Changeset 20656 for trunk


Ignore:
Timestamp:
2010-04-03T00:56:22+02:00 (7 years ago)
Author:
jow
Message:

[package] dnsmasq: allow multiple hostnames per domain section

Location:
trunk/package/dnsmasq
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/dnsmasq/Makefile

    r19942 r20656  
    1010PKG_NAME:=dnsmasq 
    1111PKG_VERSION:=2.52 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • trunk/package/dnsmasq/files/dnsmasq.init

    r20275 r20656  
    285285dhcp_domain_add() { 
    286286        local cfg="$1" 
    287  
    288         config_get name "$cfg" name 
    289         [ -n "$name" ] || return 0 
     287        local ip name names 
     288 
     289        config_get names "$cfg" name 
     290        [ -n "$names" ] || return 0 
    290291 
    291292        config_get ip "$cfg" ip 
     
    293294 
    294295        local oIFS="$IFS"; IFS="."; set -- $ip; IFS="$oIFS" 
    295         append args "-A /$name${DOMAIN:+.$DOMAIN}/$ip" 
    296         append args "--ptr-record=$4.$3.$2.$1.in-addr.arpa,$name${DOMAIN:+.$DOMAIN}" 
     296        local raddr="${4:+$4.$3.$2.$1.in-addr.arpa}" 
     297 
     298        for name in $names; do 
     299                append args "-A /$name${DOMAIN:+.$DOMAIN}/$ip" 
     300                [ -n "$raddr" ] && \ 
     301                        append args "--ptr-record=$raddr,$name${DOMAIN:+.$DOMAIN}" 
     302        done 
    297303} 
    298304 
Note: See TracChangeset for help on using the changeset viewer.