1
0
mirror of https://github.com/rancher/os.git synced 2025-07-10 05:13:03 +00:00

Cosmetic: Fixed „/var/log/boot: is a directory“ error in init

Signed-off-by: janeczku <jan@rancher.com>
This commit is contained in:
janeczku 2018-01-03 01:15:41 +01:00 committed by niusmallnan
parent 493e12b9a3
commit 5494e76041

View File

@ -362,9 +362,11 @@ func RunInit() error {
bootLog := "/var/log/"
if files, err := ioutil.ReadDir(bootLog); err == nil {
for _, file := range files {
filePath := filepath.Join(bootLog, file.Name())
filesToCopy = append(filesToCopy, filePath)
log.Debugf("Swizzle: Found %s to save", filePath)
if !file.IsDir() {
filePath := filepath.Join(bootLog, file.Name())
filesToCopy = append(filesToCopy, filePath)
log.Debugf("Swizzle: Found %s to save", filePath)
}
}
}
bootLog = "/var/log/boot/"