From 52c452debe644f07f178e85217d912d8e3aa34fb Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Mon, 15 May 2023 09:43:48 +0000 Subject: [PATCH] feat: pass kernel mask to get container volumes --- distro/debian/debian.go | 4 ++-- kernel/kernel.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/distro/debian/debian.go b/distro/debian/debian.go index 06b0f4b..8dd5daf 100644 --- a/distro/debian/debian.go +++ b/distro/debian/debian.go @@ -292,8 +292,8 @@ func ContainerKernels(d container.Image, kcfg *config.KernelConfig) (err error) return } -func ContainerVolumes(pkgname, contname string) (volumes container.Volumes) { - pkgdir := filepath.Join("volumes", contname, pkgname) +func ContainerVolumes(km config.KernelMask, pkgname string) (volumes container.Volumes) { + pkgdir := filepath.Join("volumes", km.DockerName(), pkgname) volumes.LibModules = config.Dir(pkgdir, "/lib/modules") volumes.UsrSrc = config.Dir(pkgdir, "/usr/src") diff --git a/kernel/kernel.go b/kernel/kernel.go index 9e2257a..b2d2b06 100644 --- a/kernel/kernel.go +++ b/kernel/kernel.go @@ -334,7 +334,7 @@ func installKernel(sk config.KernelMask, pkgname string, force, headers bool) (e if sk.DistroType == config.Debian { // Debian has different kernels (package version) by the // same name (ABI), so we need to separate /boot - c.Volumes = debian.ContainerVolumes(sk.DockerName(), pkgname) + c.Volumes = debian.ContainerVolumes(sk, pkgname) searchdir = config.Dir("volumes", sk.DockerName()) }