Skip to content

Commit

Permalink
Always exit with 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Herbert committed Jun 28, 2017
1 parent f1db690 commit 41beb5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ func main() {
log.SetOutput(slog)
}

cmd := exec.Command(*ipmiSel, "--output-event-state", "--comma-separated-output", "--no-header-output")
cmd := exec.Command(*ipmiSel, "--debug", "--output-event-state", "--comma-separated-output", "--no-header-output")
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
log.Fatalf("Failed running `%s` with error `%s`\n", *ipmiSel, err)
}

outStr, errStr := string(stdout.Bytes()), string(stderr.Bytes())
log.Printf("%s: stdout `%s`, stderr `%s`", *ipmiSel, outStr, errStr)
if err := cmd.Run(); err != nil {
log.Printf("Got error running `%s`: `%s`\n", *ipmiSel, err)
os.Exit(0)
}

outStr = strings.TrimSpace(outStr)
lines := strings.Split(outStr, "\n")
Expand Down

0 comments on commit 41beb5d

Please sign in to comment.