diff options
author | Philip Prindeville <philipp@redfish-solutions.com> | 2023-09-11 13:59:30 -0600 |
---|---|---|
committer | Philip Prindeville <philipp@redfish-solutions.com> | 2023-09-17 14:28:10 -0600 |
commit | 2faa29c550ee28dea0ac1abf2f8621ccf3cf962f (patch) | |
tree | 209fd5d1efe353dd5e94fe2c4c182b1b57b8c917 | |
parent | 4590decf5bba9c591954c260d0201993aefaf4cd (diff) |
isc-dhcp: Allow per-subnet domain names
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
-rwxr-xr-x | net/isc-dhcp/files/dhcpd.init | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index b0bf809a5..967ba83da 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -393,6 +393,8 @@ gen_dhcp_subnet() { fi echo " option domain-name-servers $DNS;" + [ -n "$domain" ] && echo " option domain-name \"$domain\";" + local routes= config_list_foreach "$cfg" "routes" append_routes [ -n "$routes" ] && echo " option classless-ipv4-route $routes;" @@ -405,7 +407,7 @@ dhcpd_add() { local cfg="$1" synthesize="$2" local dhcp6range="::" local dynamicdhcp defaultroute end gateway ifname ignore leasetime limit net netmask - local proto networkid start subnet + local proto networkid start subnet domain local IP NETMASK BROADCAST NETWORK PREFIX DNS START END config_get_bool ignore "$cfg" "ignore" 0 @@ -462,6 +464,8 @@ dhcpd_add() { gateway="$IP" fi + config_get domain "$cfg" "domain" + gen_dhcp_subnet "$cfg" } |