]> git.proxmox.com Git - mirror_lxc.git/commitdiff
if lxc-init can't mount /dev/shm, don't fail.
authorSerge Hallyn <serge.hallyn@canonical.com>
Tue, 7 Feb 2012 15:08:37 +0000 (09:08 -0600)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Sun, 26 Feb 2012 09:44:40 +0000 (10:44 +0100)
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>
src/lxc/utils.c

index 4647bd4e821ddbda425522e3a87f2f4d93682b44..d96914bc539eb9191537e737312ab79d45c5c3e0 100644 (file)
@@ -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 :) */