[lxc-devel] [distrobuilder/master] chroot: Fix error during chroot setup

monstermunchkin on Github lxc-bot at linuxcontainers.org
Tue Apr 23 10:19:25 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 384 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190423/760c5824/attachment.bin>
-------------- next part --------------
From 67be9d8d77f719ebdfcd64cf70cc69d8178a7a62 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Tue, 23 Apr 2019 12:17:15 +0200
Subject: [PATCH] chroot: Fix error during chroot setup

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 shared/chroot.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shared/chroot.go b/shared/chroot.go
index 8f18fb7..2b6aa9d 100644
--- a/shared/chroot.go
+++ b/shared/chroot.go
@@ -34,7 +34,7 @@ func setupMounts(rootfs string, mounts []chrootMount) error {
 
 		// Create the target mountpoint
 		if mount.isDir {
-			err := os.Mkdir(tmpTarget, 0755)
+			err := os.MkdirAll(tmpTarget, 0755)
 			if err != nil {
 				return err
 			}


More information about the lxc-devel mailing list