Commit 721d262c by Serge Hallyn Committed by Daniel Lezcano

if lxc-init can't mount /dev/shm, don't fail.

The 'lxc-init' (a lightweight init process used by lxc-execute in place of upstart etc) tries to mount /dev/shm during startup. If that fails (for instance /dev/shm does not exist) then it aborts execution and returns -1. This is unreasonable as very few applications actually need /dev/shm. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@canonical.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 8b004f07
......@@ -131,8 +131,9 @@ extern int lxc_setup_fs(void)
if (mount_fs("proc", "/proc", "proc"))
return -1;
/* if we can't mount /dev/shm, continue anyway */
if (mount_fs("shmfs", "/dev/shm", "tmpfs"))
return -1;
DEBUG("failed to mount /dev/shm");
/* If we were able to mount /dev/shm, then /dev exists */
/* Sure, but it's read-only per config :) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment