isc-dhcp: write resolv.conf per network & dhcp settings
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sun, 10 Jun 2018 21:36:22 +0000 (15:36 -0600)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 12 Jun 2018 19:52:06 +0000 (13:52 -0600)
The internal nameservers and the DHCP default domain should be
squirted into /tmp/resolv.conf.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
net/isc-dhcp/Makefile
net/isc-dhcp/files/dhcpd.init

index 06ae728140b4789bb6e1c80b71ef379eb847cb7a..51541702630d1c460958da844f051dc13992b1fd 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=isc-dhcp
 UPSTREAM_NAME:=dhcp
 PKG_VERSION:=4.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 70841903e116be3c746f26b427b2f6bdc5363c67..954d332b48bb262f486bded53779ab6b8f8b1746 100644 (file)
@@ -263,6 +263,11 @@ general_config() {
        echo "max-lease-time $max_lease_time;"
 
        [ -n "$domain" ] && echo "option domain-name \"$domain\";"
+
+       rm -f /tmp/resolv.conf
+       echo "# This file is generated by the DHCPD service" > /tmp/resolv.conf
+       [ -n "$domain" ] && echo "domain $domain" >> /tmp/resolv.conf
+       echo "nameserver 127.0.0.1" >> /tmp/resolv.conf
 }
 
 start_service() {