Stop tailing provider log (#166)

Its not our duty to trail anything, we already passing a logfile for it
to use, we log our stuff and dont pollute the standar output

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka 2023-10-18 17:16:22 +02:00 committed by GitHub
parent 8785c5e189
commit 01e0a0048c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,11 +2,10 @@ package agent
import (
"fmt"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"os"
"path/filepath"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
hook "github.com/kairos-io/kairos-agent/v2/internal/agent/hooks"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
config "github.com/kairos-io/kairos-agent/v2/pkg/config"
@ -14,7 +13,6 @@ import (
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/utils"
"github.com/nxadm/tail"
)
// Run starts the agent provider emitting the bootstrap event.
@ -52,18 +50,6 @@ func Run(opts ...Option) error {
}
}
// Tail to the log
t, err := tail.TailFile(fileName, tail.Config{Follow: true})
if err != nil {
return err
}
go func() {
for line := range t.Lines {
fmt.Println(line.Text)
}
}()
if !machine.SentinelExist("firstboot") {
spec := v1.EmptySpec{}
if err := hook.Run(*c, &spec, hook.FirstBoot...); err != nil {