mirror of
https://github.com/danderson/netboot.git
synced 2025-08-08 23:57:14 +02:00
handleBooting should return a no-op script, not an error.
Responding with an error makes iPXE print a misleading error message (misleading because it doesn't break the boot in any way, it just makes humans uncomfortable).
This commit is contained in:
parent
80ce588fdd
commit
a9d71481f7
@ -153,8 +153,11 @@ 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 handler always errors out.
|
// This should not always errors out.
|
||||||
http.Error(w, "", http.StatusInternalServerError)
|
// if we send http.StatusInternalServerError iPXE will get a image not found error
|
||||||
|
// http.Error(w, "", http.StatusInternalServerError)
|
||||||
|
// return a empty commented script
|
||||||
|
fmt.Fprintf(w, "# Booting")
|
||||||
|
|
||||||
macStr := r.URL.Query().Get("mac")
|
macStr := r.URL.Query().Get("mac")
|
||||||
if macStr == "" {
|
if macStr == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user