1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 22:32:14 +00:00

Merge pull request #1186 from ibuildthecloud/fix-respawn

Fix respawn.conf.d
This commit is contained in:
Darren Shepherd
2016-08-25 07:52:27 -07:00
committed by GitHub

View File

@@ -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))
}