Fixes recovery

- Add isRecovery to state
 - Get the TargetImage from cmdline
 - Add isrecovery to conditions

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
Itxaka
2023-02-08 18:51:53 +01:00
parent 441c4d17a3
commit 99cd455ce8
3 changed files with 13 additions and 13 deletions

View File

@@ -31,13 +31,16 @@ Sends a generic event payload with the configuration found in the scanned direct
},
Action: func(c *cli.Context) (err error) {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Logger()
img := utils.ReadCMDLineArg("cos-img/filename=")
log.Debug().Strs("TargetImage", img).Msg("Target image")
g := herd.DAG()
s := &mount.State{
Logger: log.Logger,
Rootdir: utils.GetRootDir(),
MountRoot: true,
TargetLabel: utils.BootStateToLabel(),
TargetImage: utils.BootStateToImage(),
TargetImage: img[0],
IsRecovery: utils.IsRecovery(),
}
err = s.Register(g)