diff options
author | Philip Prindeville <philipp@redfish-solutions.com> | 2021-01-28 18:05:12 -0700 |
---|---|---|
committer | Philip Prindeville <philipp@redfish-solutions.com> | 2021-01-28 18:12:11 -0700 |
commit | a138ceec863cfd934f4413f545d1527c300dcb80 (patch) | |
tree | a5841851a3bd5f7996f04ff6c52ca658d59a81fd /net/isc-dhcp/files/dhcpd.init | |
parent | 825b2c7e4fba351e8ddd922e4d5c3833cb6aac80 (diff) |
isc-dhcp: add support for multi-homing in 'domain' configs
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'net/isc-dhcp/files/dhcpd.init')
-rwxr-xr-x | net/isc-dhcp/files/dhcpd.init | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index 1436e7e2a..14b4a2748 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -179,17 +179,20 @@ static_cnames() { static_domain_add() { local cfg="$1" - local name ip revip + local name ip ips revip config_get name "$cfg" "name" [ -n "$name" ] || return 0 config_get ip "$cfg" "ip" [ -n "$ip" ] || return 0 - revip="$(rev_str "$ip" ".")" + ips="$ip" + for ip in $ips; do + revip="$(rev_str "$ip" ".")" - update "$name.$domain." IN A "$ip" - update "$revip.in-addr.arpa." IN PTR "$name.$domain." + update "$name.$domain." IN A "$ip" + update "$revip.in-addr.arpa." IN PTR "$name.$domain." + done } static_domains() { |