Browse Source

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 <philipp@redfish-solutions.com>
lilik-openwrt-22.03
Philip Prindeville 7 years ago
parent
commit
05ca13e17c
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      net/isc-dhcp/files/dhcpd.init

+ 5
- 1
net/isc-dhcp/files/dhcpd.init View File

@ -206,6 +206,8 @@ general_config() {
config_get max_lease_time "isc_dhcpd" "max_lease_time" 86400 config_get max_lease_time "isc_dhcpd" "max_lease_time" 86400
config_get log_facility "isc_dhcpd" "log_facility" config_get log_facility "isc_dhcpd" "log_facility"
config_get domain "isc_dhcpd" "domain"
[ $always_broadcast -eq 1 ] && echo "always-broadcast true;" [ $always_broadcast -eq 1 ] && echo "always-broadcast true;"
[ $authoritative -eq 1 ] && echo "authoritative;" [ $authoritative -eq 1 ] && echo "authoritative;"
[ $boot_unknown_clients -eq 0 ] && echo "boot-unknown-clients false;" [ $boot_unknown_clients -eq 0 ] && echo "boot-unknown-clients false;"
@ -220,6 +222,8 @@ general_config() {
fi fi
echo "default-lease-time $default_lease_time;" echo "default-lease-time $default_lease_time;"
echo "max-lease-time $max_lease_time;" echo "max-lease-time $max_lease_time;"
[ -n "$domain" ] && echo "option domain-name \"$domain\";"
} }
start_service() { start_service() {
@ -231,7 +235,7 @@ start_service() {
touch $lease_file touch $lease_file
fi fi
dhcp_ifs=""
local domain dhcp_ifs
if [ -e "/etc/dhcpd.conf" ] ; then if [ -e "/etc/dhcpd.conf" ] ; then
config_file="/etc/dhcpd.conf" config_file="/etc/dhcpd.conf"


Loading…
Cancel
Save