doc: Update Japanese lxc.conf(5)

translate the untranslated paragraph

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
conffile.c: Also clear text entries with no value

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Add support for new create=(dir,file) mount option

Just like we already had "optional", this adds two new LXC-specific
mount flags:
 - create=dir (will do a mkdir_p on the path)
 - create=file (will do a mkdir_p on the dirname + a fopen on the path)

This was motivated by some of the needed bind-mounts for the
unprivileged containers.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Move some common Ubuntu config

This introduces a new /usr/share/lxc/config directory containing common
configuration snippets.

The two Ubuntu templates are then simplified to just include the
relevant entries avoiding a whole lot of hardcoded cgroup, capabilities
and mount points configuration.

An extra comment is also added at the top of all generated configuration
files telling the user to look at lxc.conf(5) for more information.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
confile: Fix invalid lxc.network.ipv6 address

The writer code was using AF_INET instead of AF_INET6 when converting
the address to ascii.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
oracle: fix chcon warning when selinux disabled

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
add epoll events to mainloop callback handlers

Adding the epoll events allows the handler to determine what events
happened on the fd.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
let lxc-monitor command ask a lxc-monitord instance to quit

Once lxc-monitord receives a quit request from lxc-monitor, it will then
return from the mainloop every time an event occurs on any of its fds and
check if it has any clients left. When there are no more it exits. This
allows lxc-monitord to quit immediately instead of waiting the normal 30
seconds for more clients, potentially freeing up lxcpath for unmounting.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
busybox template: set mode when creating device nodes

Ensure mode 666 is set for tty1 and tty5

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc_monitor: Check return value of write

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lxc_monitor: Add missing include (errno.h)

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Update mailing-list addresses

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
altlinux: Use relative paths and fix rootfs variable.

Change paths in fstab to be relative to the root and fix a wrong
rootfs_path value.

Signed-off-by: Serge Logvinov <serge.logvinov@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
doc: Update Japanese lxc-monitor(1)

Update for commit 2afd1dc05ba38eacdfe5a9c79addaf3a7d182dbf

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-clone: proper type for getopt_long result

While char is a signed type and should have no trouble
storing a "-1" value, getopt_long() will return a value of 255
instead of -1. This has been noticed on powerpc; there's also
some upstream talk about it at [1].

Change variable type from char to int, since it's also the
documented use.

[1] http://stackoverflow.com/questions/17070958/c-why-does-getopt-return-255-on-linux

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-busybox: make securityfs bind-mount optional

Prevent container start from failing when running Busybox containers on hosts without securityfs support.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
call fclose() for pid_fp on failure

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
use /var/lock/subsys/lxc-centos instead of /var/lock/subsys/lxc as a lock name

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
use $LOCALSTATEDIR/lock/subsys/lxc-ubuntu$release as lock filename

Otherwise one cannot create two containers with different releases
(let's say saucy [cached] and raring [not caced]) if both are not
cached on the local filesystem already. The lock blocks cached
one to move forward until not cached one finishes it's downloads.

Fix that by seperating locks using release names

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
ubuntu: add comments about running unconfined or nested containers

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>