From 92e20827d869d81bff6b60a1a068af884bee55fb Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Wed, 24 Aug 2016 21:43:51 -0700 Subject: [PATCH] Fix respawn.conf.d --- cmd/console/console.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/console/console.go b/cmd/console/console.go index 8d63f414..7265b426 100644 --- a/cmd/console/console.go +++ b/cmd/console/console.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "os" "os/exec" + "path" "regexp" "strings" "syscall" @@ -180,9 +181,11 @@ func writeRespawn() error { files, err := ioutil.ReadDir("/etc/respawn.conf.d") if err == nil { for _, f := range files { - content, err := ioutil.ReadFile(f.Name()) + p := path.Join("/etc/respawn.conf.d", f.Name()) + content, err := ioutil.ReadFile(p) if err != nil { - return err + log.Error("Failed to read %s: %v", p, err) + continue } respawn += fmt.Sprintf("\n%s", string(content)) }