1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 06:59:12 +00:00

Merge pull request #1843 from SvenDowideit/remove-some-log-messages

Don't complain about cfg files not existing
This commit is contained in:
Sven Dowideit
2017-05-11 21:34:05 +10:00
committed by GitHub

View File

@@ -321,12 +321,14 @@ func RunInit() error {
config.MetaDataFile,
}
for _, name := range filesToCopy {
content, err := ioutil.ReadFile(name)
if err != nil {
log.Error(err)
continue
if _, err := os.Lstat(name); !os.IsNotExist(err) {
content, err := ioutil.ReadFile(name)
if err != nil {
log.Errorf("read cfg file (%s) %s", name, err)
continue
}
configFiles[name] = content
}
configFiles[name] = content
}
return cfg, nil
}},