diff --git a/internal/cmd/commands.go b/internal/cmd/commands.go index 31b9895..ba7fa7c 100644 --- a/internal/cmd/commands.go +++ b/internal/cmd/commands.go @@ -59,7 +59,11 @@ Sends a generic event payload with the configuration found in the scanned direct img := utils.ReadCMDLineArg("cos-img/filename=") if len(img) == 0 { - log.Logger.Fatal().Msg("Could not get the image name from cmdline (i.e. cos-img/filename=/cOS/active.img)") + if c.Bool("dry-run") { + img = []string{"fake"} + } else { + log.Logger.Fatal().Msg("Could not get the image name from cmdline (i.e. cos-img/filename=/cOS/active.img)") + } } log.Debug().Strs("TargetImage", img).Msg("Target image") g := herd.DAG() diff --git a/pkg/mount/mount.go b/pkg/mount/mount.go index a10989e..da91345 100644 --- a/pkg/mount/mount.go +++ b/pkg/mount/mount.go @@ -92,6 +92,13 @@ func (s *State) RunStageOp(stage string) func(context.Context) error { return err } } + if _, err := os.Stat("/oem"); os.IsNotExist(err) { + err = os.Symlink("/sysroot/oem", "/oem") + if err != nil { + s.Logger.Err(err).Msg("creating symlink") + return err + } + } } cmd := fmt.Sprintf("elemental run-stage %s", stage)