mirror of
https://github.com/rancher/os.git
synced 2025-07-02 01:31:48 +00:00
Don't complain about cfg files not existing
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
cf89c124a4
commit
1e26b0b687
12
init/init.go
12
init/init.go
@ -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
|
||||
}},
|
||||
|
Loading…
Reference in New Issue
Block a user