From 1e66c156fa308e407580c331d4708e2cfb053688 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 23 Mar 2023 20:28:42 +0000 Subject: [PATCH] Run permission fix only once per container --- kernel.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/kernel.go b/kernel.go index 28db38d..109caaa 100644 --- a/kernel.go +++ b/kernel.go @@ -620,15 +620,14 @@ func genDockerKernels(dii dockerImageInfo, newkcfg *config.KernelConfig, RootFS: rootfs, } newkcfg.Kernels = append(newkcfg.Kernels, ki) + } - log.Info().Msg("Fix permissions...") - for _, cmd := range []string{ - "find /boot -type f -exec chmod a+r {} \\;", - } { - _, err = c.Run("/tmp", cmd) - if err != nil { - return - } + for _, cmd := range []string{ + "find /boot -type f -exec chmod a+r {} \\;", + } { + _, err = c.Run("/tmp", cmd) + if err != nil { + return } }