mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00
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:
parent
8785c5e189
commit
01e0a0048c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user