iPXE loads multiple initrds when each is given to it's own initrd command

This commit is contained in:
Maxim Ivanov
2017-11-20 18:41:10 +00:00
parent c75fc8f88e
commit a683e8261e
2 changed files with 5 additions and 2 deletions

View File

@@ -15,7 +15,9 @@ chain ipxe?uuid=${uuid}&mac=${mac:hexhyp}&domain=${domain}&hostname=${hostname}&
var ipxeTemplate = template.Must(template.New("iPXE config").Parse(`#!ipxe
kernel {{.Kernel}}{{range $arg := .Args}} {{$arg}}{{end}}
initrd {{ range $element := .Initrd }}{{$element}} {{end}}
{{- range $element := .Initrd }}
initrd {{$element}}
{{- end}}
boot
`))

View File

@@ -34,7 +34,8 @@ func TestIPXEHandler(t *testing.T) {
// - the Profile's NetBoot config is rendered as an iPXE script
expectedScript := `#!ipxe
kernel /image/kernel a=b c
initrd /image/initrd_a /image/initrd_b
initrd /image/initrd_a
initrd /image/initrd_b
boot
`
assert.Equal(t, http.StatusOK, w.Code)