diff --git a/internal/pxe/supervisor.go b/internal/pxe/supervisor.go index 0fe41df..bbb5250 100644 --- a/internal/pxe/supervisor.go +++ b/internal/pxe/supervisor.go @@ -79,11 +79,11 @@ func (s *Supervisor) writeConfig(hosts []model.Host) error { confPath := filepath.Join(s.cfg.RuntimeDir, "dnsmasq.conf") hostsPath := filepath.Join(s.cfg.RuntimeDir, "dhcp-hostsfile") - var macs []string + var lines []string for _, h := range hosts { - macs = append(macs, h.MAC) + lines = append(lines, h.MAC+",set:known") } - if err := os.WriteFile(hostsPath, []byte(strings.Join(macs, "\n")+"\n"), 0o644); err != nil { + if err := os.WriteFile(hostsPath, []byte(strings.Join(lines, "\n")+"\n"), 0o644); err != nil { return fmt.Errorf("pxe: write dhcp-hostsfile: %w", err) }