diff --git a/pixiecore/dhcp.go b/pixiecore/dhcp.go index 27c6450..0a8251c 100644 --- a/pixiecore/dhcp.go +++ b/pixiecore/dhcp.go @@ -42,6 +42,8 @@ func (s *Server) serveDHCP(conn *dhcp4.Conn) error { continue } + s.debug("DHCP", "Got valid request to boot %s (%s)", mach.MAC, mach.Arch) + spec, err := s.Booter.BootSpec(mach) if err != nil { s.log("DHCP", "Couldn't get bootspec for %s: %s", pkt.HardwareAddr, err) diff --git a/pixiecore/pixiecore.go b/pixiecore/pixiecore.go index 62db82c..aece793 100644 --- a/pixiecore/pixiecore.go +++ b/pixiecore/pixiecore.go @@ -53,6 +53,17 @@ const ( ArchX64 ) +func (a Architecture) String() string { + switch a { + case ArchIA32: + return "IA32" + case ArchX64: + return "X64" + default: + return "Unknown architecture" + } +} + // A Machine describes a machine that is attempting to boot. type Machine struct { MAC net.HardwareAddr