mirror of
https://github.com/danderson/netboot.git
synced 2026-05-06 04:46:28 +02:00
Add a debug log entry in DHCP before fetching the bootspec.
Adding this line lets us time the bootspec retrieval by comparing the timestamps of "Got valid request..." and "Offering to boot..."
This commit is contained in:
parent
4ffbe802e0
commit
63c4bab4d1
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user