mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 13:47:41 +00:00
Let sshd template work on ubuntu systems.
/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>
This commit is contained in:
parent
cdcee3c7ff
commit
b91b1cd79c
@ -135,9 +135,10 @@ extern int lxc_setup_fs(void)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* If we were able to mount /dev/shm, then /dev exists */
|
/* 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)) {
|
if (access("/dev/mqueue", F_OK) && mkdir("/dev/mqueue", 0666)) {
|
||||||
SYSERROR("failed to create '/dev/mqueue'");
|
DEBUG("failed to create '/dev/mqueue'");
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mount_fs("mqueue", "/dev/mqueue", "mqueue"))
|
if (mount_fs("mqueue", "/dev/mqueue", "mqueue"))
|
||||||
|
@ -30,6 +30,7 @@ $rootfs/var/empty/sshd \
|
|||||||
$rootfs/var/lib/empty/sshd \
|
$rootfs/var/lib/empty/sshd \
|
||||||
$rootfs/etc/ssh \
|
$rootfs/etc/ssh \
|
||||||
$rootfs/dev/shm \
|
$rootfs/dev/shm \
|
||||||
|
$rootfs/run/shm \
|
||||||
$rootfs/proc \
|
$rootfs/proc \
|
||||||
$rootfs/bin \
|
$rootfs/bin \
|
||||||
$rootfs/sbin \
|
$rootfs/sbin \
|
||||||
|
Loading…
Reference in New Issue
Block a user