lxc-debian: support systemd as PID 1

Containers with systemd need a somewhat special setup, which I borrowed
and adapted from lxc-fedora. These changes are required so that Debian 8
(jessie) containers work properly, and are a no-op for previous Debian
versions.

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lxc-plamo: mount tmpfs on /dev/shm

Do mkdir $rootfs/dev/shm and then mount tmpfs on /dev/shm.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Fix the lxc manpage a bit

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lua: fix return value of attach() method

Add simple test case for attach() method. Add assert for return value
from create() method which also returns a boolean.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc_info: flush stdout before calling routines which may fork

Otherwise both resulting takss will print what they had flushed when they
exit.

This fixes https://bugs.launchpad.net/bugs/1389244

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Tested-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
conf.c: change 'instanciate' to 'instantiate'

This is a multipart message in MIME format.

Fixes a small (but consistent) spelling mistake in conf.c

Signed-off-by: Joel Nider <joeln@il.ibm.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-cirros: support creating+running unprivileged

Support creation and use of lxc-cirros by unprivileged users.

If we detect we are an unprivileged user, then insist that we
be in a userns with a id mapping.

If we are in a userns, then don't extract /dev when extracting
the rootfs.

If we are not root, then save the tarball to ~/.cache/lxc/cirros
instead of /var/cache/lxc/cirros.

If we are not roo, then include entries to auto-mount proc and sys,
as well as bind-mount devices.

Cc: Scott Moser <smoser@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
openwrt: add common configuration file

This adds OpenWrt common config file.

Signed-off-by: Petar Koretic <petar.koretic@sartura.hr>
CC: Luka Perkov <luka.perkov@sartura.hr>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Fix lxc-openmandriva.in typo.

Signed-off-by: 謝致邦 <Yeking@Red54.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Fix lxc-centos.in typo.

Signed-off-by: 謝致邦 <Yeking@Red54.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-create -t option is not optional

Closes: #355

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
doc: Update kernel and cgroup info in Japanese lxc(7)

Update for commit 0dcbd62

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-opensuse: template now understands release arguments

Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-opensuse: Added explanation on how to use the template

Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-opensuse: Check if given argument is a valid release

Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
doc: change "-t" option of lxc-create(1) to being required

* fix "reg" to "req" in English (fix for commit b8683fe)
* change "opt" to "req" in Japanese

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Remounts bind mounts if read-only flag is provided

Bind mounts do not honor filesystem mount options. This change will
remount filesystems that are bind mounted if there are changes to
filesystem mount options, specifically if the mount is readonly.

Signed-off-by: Abin Shahab <ashahab@altiscale.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Fix nbd partition id test

Reported-by: David Binderman
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
fix wrong nlmsg_len

nlmsg_len is the length of message including header.

Signed-off-by: Shuai Zhang <zs.broccoli@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-alpine: make sure /dev/shm is world writeable

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>