Improve the comment explaining why handleBooting returns an iPXE script.

This commit is contained in:
David Anderson 2017-02-24 15:30:38 -08:00
parent a9d71481f7
commit 4e411248b1

View File

@ -153,10 +153,9 @@ func (s *Server) handleFile(w http.ResponseWriter, r *http.Request) {
} }
func (s *Server) handleBooting(w http.ResponseWriter, r *http.Request) { func (s *Server) handleBooting(w http.ResponseWriter, r *http.Request) {
// This should not always errors out. // Return a no-op boot script, to satisfy iPXE. It won't get used,
// if we send http.StatusInternalServerError iPXE will get a image not found error // the boot script deletes this image immediately after
// http.Error(w, "", http.StatusInternalServerError) // downloading.
// return a empty commented script
fmt.Fprintf(w, "# Booting") fmt.Fprintf(w, "# Booting")
macStr := r.URL.Query().Get("mac") macStr := r.URL.Query().Get("mac")