diff --git a/cmd/root.go b/cmd/root.go index 2c08614..17b2174 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -96,9 +96,6 @@ func Run(log *slog.Logger, spec *Specification, hal hal.InBand) (*event.EventEmi return eventEmitter, fmt.Errorf("interfaces %w", err) } - // Set Time from ntp - network.NtpDate(log, spec.MetalConfig.NTPServers) - reg := register.New(log, spec.MachineUUID, spec.MetalConfig.Partition, bootService, eventEmitter, n, hal) err = reg.RegisterMachine() diff --git a/main.go b/main.go index 3a76aa2..3dead8f 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,10 @@ func main() { log.Info("starting", "version", v.V.String(), "hal", hal.Describe()) spec := cmd.NewSpec(log) + + // Set Time from ntp + network.NtpDate(log, spec.MetalConfig.NTPServers) + spec.MachineUUID = uuid.String() spec.IP = ip