From 906bfdae7396fd8ebed39de4b767de925e23724d Mon Sep 17 00:00:00 2001 From: Itxaka Date: Thu, 13 Jun 2024 11:27:22 +0200 Subject: [PATCH] Add some missing run dirs on uki (#337) --- internal/utils/mounts.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/utils/mounts.go b/internal/utils/mounts.go index acac065..cc1a593 100644 --- a/internal/utils/mounts.go +++ b/internal/utils/mounts.go @@ -208,6 +208,15 @@ func MountBasic() { if !IsMounted("/run") { _ = Mount("tmpfs", "/run", "tmpfs", syscall.MS_NOSUID|syscall.MS_NODEV|syscall.MS_NOEXEC|syscall.MS_RELATIME, "mode=755") _ = Mount("", "/run", "", syscall.MS_SHARED, "") + // Create some default dirs in /run + // Usually systemd-tmpfiles/tmpfilesd would create those but we don't have that here at this point + _ = os.MkdirAll("/run/lock", 0755) + // LVM would probably need this dir + _ = os.MkdirAll("/run/lock/lvm", 0755) + // /run/lock/subsys is used for serializing SysV service execution, and + // hence without use on SysV-less systems. + _ = os.MkdirAll("/run/lock/subsys", 0755) + } }