DHCP template generates as much of the subnet and range definition as possible.
- Closes: #1469 This makes it possible to disable just the dynamic range without losing access to the next-server required by static host entries. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -46,11 +46,15 @@ if exists user-class and option user-class = "iPXE" {
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .Network .Netmask .Dhcp.RangeStart .Dhcp.RangeEnd }}
|
||||
{{- if and .Network .Netmask }}
|
||||
subnet {{.Network}} netmask {{.Netmask}} {
|
||||
max-lease-time 120;
|
||||
{{- if and .Dhcp.RangeStart .Dhcp.RangeEnd }}
|
||||
range {{.Dhcp.RangeStart}} {{.Dhcp.RangeEnd}};
|
||||
{{- end }}
|
||||
{{- if .Ipaddr }}
|
||||
next-server {{.Ipaddr}};
|
||||
{{- end }}
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user