From a0427a8b5314c9447685dd159409b946ba951b80 Mon Sep 17 00:00:00 2001 From: Dimitris Karakasilis Date: Mon, 14 Oct 2024 17:25:30 +0300 Subject: [PATCH] Show debug log in netbooting It doesn't seem to be so many logs anyway, so it's better that we show it. Signed-off-by: Dimitris Karakasilis --- pkg/netboot/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/netboot/server.go b/pkg/netboot/server.go index 1027467..861456c 100644 --- a/pkg/netboot/server.go +++ b/pkg/netboot/server.go @@ -31,6 +31,8 @@ func Server(kernel, bootmsg, cmdline string, address, httpPort string, initrds [ return err } + logger := func(subsystem, msg string) { log.Printf("%s: %s\n", subsystem, msg) } + ipxeFw := map[pixiecore.Firmware][]byte{} ipxeFw[pixiecore.FirmwareX86PC] = ipxe.MustAsset("third_party/ipxe/src/bin/undionly.kpxe") ipxeFw[pixiecore.FirmwareEFI32] = ipxe.MustAsset("third_party/ipxe/src/bin-i386-efi/ipxe.efi") @@ -39,7 +41,8 @@ func Server(kernel, bootmsg, cmdline string, address, httpPort string, initrds [ ipxeFw[pixiecore.FirmwareX86Ipxe] = ipxe.MustAsset("third_party/ipxe/src/bin/ipxe.pxe") s := &pixiecore.Server{ Ipxe: ipxeFw, - Log: func(subsystem, msg string) { log.Printf("%s: %s\n", subsystem, msg) }, + Log: logger, + Debug: logger, HTTPPort: port, HTTPStatusPort: 0, DHCPNoBind: nobind,