Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: package/dnsmasq/files/dnsmasq.init
- ===================================================================
- --- package/dnsmasq/files/dnsmasq.init (revision 29417)
- +++ package/dnsmasq/files/dnsmasq.init (working copy)
- @@ -145,8 +145,14 @@
- config_get subscriberid "$cfg" subscriberid
- [ -n "$subscriberid" ] || return 0
- - append args "--dhcp-subscrid=$networkid,$subscriberid"
- + config_get tag "$cfg" tag
- + for subscriberid in $subscriberid; do
- + for tag in ${tag:-""}; do
- + append args "--dhcp-subscrid=$networkid,$subscriberid${tag:+,set:$tag}"
- + done
- + done
- +
- dhcp_option_add "$cfg" "$networkid"
- }
- @@ -159,8 +165,14 @@
- config_get remoteid "$cfg" remoteid
- [ -n "$remoteid" ] || return 0
- - append args "--dhcp-remoteid=$networkid,$remoteid"
- + config_get tag "$cfg" tag
- + for remoteid in $remoteid; do
- + for tag in ${tag:-""}; do
- + append args "--dhcp-remoteid=$networkid,$remoteid${tag:+,set:$tag}"
- + done
- + done
- +
- dhcp_option_add "$cfg" "$networkid"
- }
- @@ -173,8 +185,14 @@
- config_get circuitid "$cfg" circuitid
- [ -n "$circuitid" ] || return 0
- - append args "--dhcp-circuitid=$networkid,$circuitid"
- + config_get tag "$cfg" tag
- + for circuitid in $circuitid; do
- + for tag in ${tag:-""}; do
- + append args "--dhcp-circuitid=$networkid,$circuitid${tag:+,set:$tag}"
- + done
- + done
- +
- dhcp_option_add "$cfg" "$networkid"
- }
- @@ -187,8 +205,14 @@
- config_get userclass "$cfg" userclass
- [ -n "$userclass" ] || return 0
- - append args "--dhcp-userclass=$networkid,$userclass"
- + config_get tag "$cfg" tag
- + for userclass in $userclass; do
- + for tag in ${tag:-""}; do
- + append args "--dhcp-userclass=$networkid,$userclass${tag:+,set:$tag}"
- + done
- + done
- +
- dhcp_option_add "$cfg" "$networkid"
- }
- @@ -201,8 +225,14 @@
- config_get vendorclass "$cfg" vendorclass
- [ -n "$vendorclass" ] || return 0
- - append args "--dhcp-vendorclass=$networkid,$vendorclass"
- + config_get tag "$cfg" tag
- + for vendorclass in $vendorclass; do
- + for tag in ${tag:-""}; do
- + append args "--dhcp-vendorclass=$networkid,$vendorclass${tag:+,set:$tag}"
- + done
- + done
- +
- dhcp_option_add "$cfg" "$networkid"
- }
- @@ -210,8 +240,14 @@
- local cfg="$1"
- config_get networkid "$cfg" networkid
- - [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid"
- + config_get match "$cfg" match
- + [ -n "$networkid" ] && {
- + for match in ${match:-""}; do
- + dhcp_option_add "$cfg" "$networkid" "$match"
- + done
- + }
- +
- config_get name "$cfg" name
- config_get ip "$cfg" ip
- [ -n "$ip" ] || [ -n "$name" ] || return 0
- @@ -233,8 +269,14 @@
- config_get mac "$cfg" mac
- [ -n "$mac" ] || return 0
- - append args "--dhcp-mac=$networkid,$mac"
- + config_get tag "$cfg" tag
- + for mac in $mac; do
- + for tag in ${tag:-""}; do
- + append args "--dhcp-mac=$networkid,$mac${tag:+,set:$tag}"
- + done
- + done
- +
- dhcp_option_add "$cfg" "$networkid"
- }
- @@ -314,10 +356,11 @@
- dhcp_option_add() {
- local cfg="$1"
- local networkid="$2"
- + local match="$3"
- config_get dhcp_option "$cfg" dhcp_option
- for o in $dhcp_option; do
- - append args "-O $networkid","$o"
- + append args "-O $networkid","$o"${match:+,"tag:$match"}
- done
- }
Add Comment
Please, Sign In to add comment