Skip to content

Commit

Permalink
Restore commented code
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
  • Loading branch information
Itxaka committed Jul 12, 2023
1 parent a1423f7 commit 70155af
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions internal/agent/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,32 +49,29 @@ func Reset(debug bool, dir ...string) error {

cmd.PrintText(agentConfig.Branding.Reset, "Reset")

/*
// We don't close the lock, as none of the following actions are expected to return
lock := sync.Mutex{}
go func() {
// Wait for user input and go back to shell
utils.Prompt("") //nolint:errcheck
// give tty1 back
svc, err := machine.Getty(1)
if err == nil {
svc.Start() //nolint:errcheck
}
lock.Lock()
fmt.Println("Reset aborted")
panic(utils.Shell().Run())
}()
if !agentConfig.Fast {
time.Sleep(60 * time.Second)
// We don't close the lock, as none of the following actions are expected to return
lock := sync.Mutex{}
go func() {
// Wait for user input and go back to shell
utils.Prompt("") //nolint:errcheck
// give tty1 back
svc, err := machine.Getty(1)
if err == nil {
svc.Start() //nolint:errcheck
}

lock.Lock()
fmt.Println("Reset aborted")
panic(utils.Shell().Run())
}()

ensureDataSourceReady()
if !agentConfig.Fast {
time.Sleep(60 * time.Second)
}
lock.Lock()

ensureDataSourceReady()

*/
bus.Manager.Publish(sdk.EventBeforeReset, sdk.EventPayload{}) //nolint:errcheck

c, err := config.Scan(collector.Directories(dir...))
Expand Down

0 comments on commit 70155af

Please sign in to comment.