From: Serge Hallyn Date: Tue, 7 Feb 2012 15:08:37 +0000 (-0600) Subject: if lxc-init can't mount /dev/shm, don't fail. X-Git-Tag: lxc-0.8.0-rc2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=721d262cf10111af48514ec90cf85c88f8335aff;p=thirdparty%2Flxc.git 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 --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 4647bd4e8..d96914bc5 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 :) */