diff options
Diffstat (limited to 'recipes-containers/lxc/files/lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch')
| -rw-r--r-- | recipes-containers/lxc/files/lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/recipes-containers/lxc/files/lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch b/recipes-containers/lxc/files/lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch deleted file mode 100644 index 751a7ac6..00000000 --- a/recipes-containers/lxc/files/lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | From 81e3c9cf8b2f230d761738da28e9dc69fb90ec46 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
| 3 | Date: Fri, 8 Jan 2016 15:38:44 +0000 | ||
| 4 | Subject: [PATCH] lxc_setup_fs: Create /dev/shm folder if it doesn't exist | ||
| 5 | |||
| 6 | When running application containers with lxc-execute, /dev is | ||
| 7 | populated only with device entries. Since /dev is a tmpfs mount in | ||
| 8 | the container environment, the /dev/shm folder not being present is not | ||
| 9 | a sufficient reason for the /dev/shm mount to fail. | ||
| 10 | |||
| 11 | Create the /dev/shm directory if not present. | ||
| 12 | |||
| 13 | Upstream-status: Accepted | ||
| 14 | [https://github.com/lxc/lxc/commit/81e3c9cf8b2f230d761738da28e9dc69fb90ec46] | ||
| 15 | |||
| 16 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
| 17 | Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> | ||
| 18 | --- | ||
| 19 | src/lxc/initutils.c | 4 ++++ | ||
| 20 | 1 file changed, 4 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/src/lxc/initutils.c b/src/lxc/initutils.c | ||
| 23 | index 45df60f..8d9016c 100644 | ||
| 24 | --- a/src/lxc/initutils.c | ||
| 25 | +++ b/src/lxc/initutils.c | ||
| 26 | @@ -47,6 +47,10 @@ extern void lxc_setup_fs(void) | ||
| 27 | if (mount_fs("proc", "/proc", "proc")) | ||
| 28 | INFO("failed to remount proc"); | ||
| 29 | |||
| 30 | + /* if /dev has been populated by us, /dev/shm does not exist */ | ||
| 31 | + if (access("/dev/shm", F_OK) && mkdir("/dev/shm", 0777)) | ||
| 32 | + INFO("failed to create /dev/shm"); | ||
| 33 | + | ||
| 34 | /* if we can't mount /dev/shm, continue anyway */ | ||
| 35 | if (mount_fs("shmfs", "/dev/shm", "tmpfs")) | ||
| 36 | INFO("failed to mount /dev/shm"); | ||
| 37 | -- | ||
| 38 | 1.9.1 | ||
| 39 | |||
