]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Let sshd template work on ubuntu systems.
authorSerge E. Hallyn <serge.hallyn@canonical.com>
Mon, 24 Oct 2011 12:38:30 +0000 (14:38 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Mon, 24 Oct 2011 12:38:30 +0000 (14:38 +0200)
/dev/shm is a symlink to /run/shm, so we need /run/shm
to exist in the container rootfs.  Also, /dev/mqueue does
not exist on the host, and can't be created by the container.
But we don't really need it so ignore that.

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/utils.c
templates/lxc-sshd.in

index 6279d77b5437807fcde679713b9dee8c488b32a4..4647bd4e821ddbda425522e3a87f2f4d93682b44 100644 (file)
@@ -135,9 +135,10 @@ extern int lxc_setup_fs(void)
                return -1;
 
        /* If we were able to mount /dev/shm, then /dev exists */
+       /* Sure, but it's read-only per config :) */
        if (access("/dev/mqueue", F_OK) && mkdir("/dev/mqueue", 0666)) {
-               SYSERROR("failed to create '/dev/mqueue'");
-               return -1;
+               DEBUG("failed to create '/dev/mqueue'");
+               return 0;
        }
 
        if (mount_fs("mqueue", "/dev/mqueue", "mqueue"))
index 0e8346f9019a16841d726e39e5dbe5e3fdaba63c..bd5d293e83275e6f09d1e5c9c1ba8fd0163e633b 100644 (file)
@@ -30,6 +30,7 @@ $rootfs/var/empty/sshd \
 $rootfs/var/lib/empty/sshd \
 $rootfs/etc/ssh \
 $rootfs/dev/shm \
+$rootfs/run/shm \
 $rootfs/proc \
 $rootfs/bin \
 $rootfs/sbin \