bundles/dhcpd add defaults file and some escaping
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
ef211f7356
commit
cbfc8c75ad
4 changed files with 62 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
#dhcpd.conf
|
||||
|
||||
<%
|
||||
import re
|
||||
%>
|
||||
ddns-update-style none;
|
||||
|
||||
authoritative;
|
||||
|
@ -9,11 +12,15 @@ subnet ${subnet['subnet']} netmask ${subnet['netmask']} {
|
|||
% if subnet.get('range_lower', None) and subnet.get('range_higher', None):
|
||||
range ${subnet['range_lower']} ${subnet['range_higher']};
|
||||
% endif
|
||||
interface ${subnet['interface']};
|
||||
interface "${subnet['interface']}";
|
||||
default-lease-time ${subnet.get('default-lease-time', 600)};
|
||||
max-lease-time ${subnet.get('max-lease-time', 3600)};
|
||||
% for option, value in sorted(subnet.get('options', {}).items()):
|
||||
% if re.match('([^0-9\.,\ ])', value):
|
||||
option ${option} "${value}";
|
||||
% else:
|
||||
option ${option} ${value};
|
||||
% endif
|
||||
% endfor
|
||||
}
|
||||
% endfor
|
||||
|
|
18
bundles/dhcpd/files/isc-dhcp-server
Normal file
18
bundles/dhcpd/files/isc-dhcp-server
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
|
||||
|
||||
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
|
||||
#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
|
||||
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
|
||||
|
||||
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
|
||||
#DHCPDv4_PID=/var/run/dhcpd.pid
|
||||
#DHCPDv6_PID=/var/run/dhcpd6.pid
|
||||
|
||||
# Additional options to start dhcpd with.
|
||||
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
|
||||
#OPTIONS=""
|
||||
|
||||
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
|
||||
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
|
||||
INTERFACESv4="${listen_interfaces}"
|
||||
INTERFACESv6=""
|
Loading…
Add table
Add a link
Reference in a new issue