From 721d262cf10111af48514ec90cf85c88f8335aff Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 7 Feb 2012 09:08:37 -0600 Subject: 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: Serge Hallyn Signed-off-by: Daniel Lezcano --- src/lxc/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 4647bd4..d96914b 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -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 :) */ -- cgit v1.2.3-65-gdbad