Use SDK to get machine state

This commit is contained in:
mudler
2023-02-06 14:49:35 +01:00
parent 46a7ee94ed
commit 13e11fca24
4 changed files with 50 additions and 12 deletions

View File

@@ -49,11 +49,17 @@ Sends a generic event payload with the configuration found in the scanned direct
return err
}
if utils.BootedFromCD(fs) {
log.Info().Msg("Seems we booted from CD, doing nothing. Bye!")
cdBoot, err := utils.BootedFromCD(fs)
if err != nil {
s.Logger.Err(err)
return err
}
if cdBoot {
log.Info().Msg("Seems we booted from CD, doing nothing. Bye!")
return nil
}
log.Print("Calling dag")
return g.Run(context.Background())
},