From 05ca13e17c29938ddf26a5e7050eb1fa7bae9b66 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 25 Mar 2018 01:49:13 -0600 Subject: [PATCH] isc-dhcp: allow explicitly configuring a domain Setting a domain now results in 'option domain-name "xyzzy";' being generated globally. Signed-off-by: Philip Prindeville --- net/isc-dhcp/files/dhcpd.init | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index e853ffe0a..453adfa81 100644 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -206,6 +206,8 @@ general_config() { config_get max_lease_time "isc_dhcpd" "max_lease_time" 86400 config_get log_facility "isc_dhcpd" "log_facility" + config_get domain "isc_dhcpd" "domain" + [ $always_broadcast -eq 1 ] && echo "always-broadcast true;" [ $authoritative -eq 1 ] && echo "authoritative;" [ $boot_unknown_clients -eq 0 ] && echo "boot-unknown-clients false;" @@ -220,6 +222,8 @@ general_config() { fi echo "default-lease-time $default_lease_time;" echo "max-lease-time $max_lease_time;" + + [ -n "$domain" ] && echo "option domain-name \"$domain\";" } start_service() { @@ -231,7 +235,7 @@ start_service() { touch $lease_file fi - dhcp_ifs="" + local domain dhcp_ifs if [ -e "/etc/dhcpd.conf" ] ; then config_file="/etc/dhcpd.conf"