diff options
author | Serge Hallyn <serge.hallyn@canonical.com> | 2012-02-07 09:08:37 -0600 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@free.fr> | 2012-02-26 10:44:40 +0100 |
commit | 721d262cf10111af48514ec90cf85c88f8335aff (patch) | |
tree | 421c70ef0a67fd17cc775412c7f8581a45b83f04 /src | |
parent | Don't raise error if container didn't sys_reboot (diff) | |
download | lxc-721d262cf10111af48514ec90cf85c88f8335aff.tar.gz lxc-721d262cf10111af48514ec90cf85c88f8335aff.tar.bz2 lxc-721d262cf10111af48514ec90cf85c88f8335aff.zip |
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 <serge.hallyn@canonical.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lxc/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 :) */ |