1
0

Run permission fix only once per container

This commit is contained in:
dump_stack() 2023-03-23 20:28:42 +00:00
parent 2b54d13b9e
commit 1e66c156fa
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -620,15 +620,14 @@ func genDockerKernels(dii dockerImageInfo, newkcfg *config.KernelConfig,
RootFS: rootfs, RootFS: rootfs,
} }
newkcfg.Kernels = append(newkcfg.Kernels, ki) newkcfg.Kernels = append(newkcfg.Kernels, ki)
}
log.Info().Msg("Fix permissions...") for _, cmd := range []string{
for _, cmd := range []string{ "find /boot -type f -exec chmod a+r {} \\;",
"find /boot -type f -exec chmod a+r {} \\;", } {
} { _, err = c.Run("/tmp", cmd)
_, err = c.Run("/tmp", cmd) if err != nil {
if err != nil { return
return
}
} }
} }