Remove new dhcp config options
Discussion indicated a need for more general handling of network config. Avoids adding new options that may become deprecated in the near future.
This commit is contained in:
@@ -13,13 +13,6 @@ echo Kernel: {{.ContainerName}} (container default)
|
||||
echo KernelArgs: {{.KernelArgs}}
|
||||
echo
|
||||
|
||||
{{if ne .Syslog "" -}}
|
||||
set syslog {{$.Syslog}};
|
||||
{{- end}}
|
||||
{{if ne .Syslogs "" -}}
|
||||
set syslogs {{$.Syslogs}};
|
||||
{{- end}}
|
||||
|
||||
set uri_base http://{{.Ipaddr}}:{{.Port}}/provision/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid}
|
||||
echo Downloading node provisions: ${uri_base}
|
||||
|
||||
|
||||
@@ -38,10 +38,6 @@ type DhcpConf struct {
|
||||
RangeStart string `yaml:"range start" default:"192.168.200.50"`
|
||||
RangeEnd string `yaml:"range end" default:"192.168.200.99"`
|
||||
SystemdName string `yaml:"systemd name" default:"dhcpd"`
|
||||
Syslog string `yaml:"syslog" default:""`
|
||||
Syslogs string `yaml:"syslogs" default:""`
|
||||
Interface string `yaml:"interface" default:""`
|
||||
Hwaddr string `yaml:"hwaddr" default:""`
|
||||
}
|
||||
|
||||
type TftpConf struct {
|
||||
|
||||
@@ -28,8 +28,6 @@ type iPxeTemplate struct {
|
||||
Hwaddr string
|
||||
Ipaddr string
|
||||
Port string
|
||||
Syslog string
|
||||
Syslogs string
|
||||
KernelArgs string
|
||||
KernelOverride string
|
||||
}
|
||||
@@ -138,8 +136,6 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
|
||||
Fqdn : node.Id.Get(),
|
||||
Ipaddr : conf.Ipaddr,
|
||||
Port : strconv.Itoa(conf.Warewulf.Port),
|
||||
Syslog : conf.Dhcp.Syslog,
|
||||
Syslogs : conf.Dhcp.Syslogs,
|
||||
Hostname : node.Id.Get(),
|
||||
Hwaddr : rinfo.hwaddr,
|
||||
ContainerName : node.ContainerName.Get(),
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
# Time: {{.BuildTime}}
|
||||
# Source: {{.BuildSource}}
|
||||
|
||||
{{if ne .Dhcp.Interface "" -}}
|
||||
INTERFACESv4="{{$.Dhcp.Interface}}";
|
||||
{{- end}}
|
||||
|
||||
allow booting;
|
||||
allow bootp;
|
||||
ddns-update-style interim;
|
||||
@@ -19,16 +15,6 @@ option space ipxe;
|
||||
option ipxe.no-pxedhcp code 176 = unsigned integer 8;
|
||||
option ipxe.no-pxedhcp 1;
|
||||
|
||||
# https://ipxe.org/cfg/syslogs
|
||||
{{if ne .Dhcp.Syslog "" -}}
|
||||
option log-servers {{$.Dhcp.Syslog}};
|
||||
{{end -}}
|
||||
{{if ne .Dhcp.Syslogs "" -}}
|
||||
option ipxe-encap-opts code 175 = encapsulate ipxe;
|
||||
option ipxe.syslogs code 85 = string;
|
||||
option ipxe.syslogs "{{$.Dhcp.Syslogs}}";
|
||||
{{end -}}
|
||||
|
||||
option architecture-type code 93 = unsigned integer 16;
|
||||
|
||||
if exists user-class and option user-class = "iPXE" {
|
||||
@@ -50,14 +36,6 @@ if exists user-class and option user-class = "iPXE" {
|
||||
}
|
||||
}
|
||||
|
||||
host {{$.Id}} {
|
||||
{{- if ne .Dhcp.Hwaddr ""}}
|
||||
hardware ethernet {{$.Dhcp.Hwaddr}};
|
||||
{{- end}}
|
||||
fixed-address {{$.Ipaddr}};
|
||||
option host-name "{{$.Id}}";
|
||||
}
|
||||
|
||||
{{if eq .Dhcp.Template "static" -}}
|
||||
subnet {{$.Network}} netmask {{$.Netmask}} {
|
||||
next-server {{$.Ipaddr}};
|
||||
|
||||
Reference in New Issue
Block a user