lxc-debian: fix formatting

added space ">/" -> ">  /"

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-debian: standardize formatting

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-debian: added support for package installation

- added --mirror, --security-mirror and --package parameters
- generate source.list
- install packages into final lxc instance

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
tests: Clarify error message and fix return codes

Reported-by: Michael J. Evans
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
tests: lxc-test-ubuntu doesn't actually need bind9-host

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
rootfs_is_blockdev: don't run if no rootfs is specified

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
confile: sanity-check netdev->type before setting netdev->priv elements

The netdev->priv is shared for the netdev types.  A bad config file
could mix configuration for different types, resulting in a bad
netdev->priv when starting or even destroying a container.  So sanity
check the netdev->type before setting a netdev->priv element.

This should fix https://github.com/lxc/lxc/issues/254

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Fix typo in previous patch

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
centos template: prevent mingetty from calling vhangup(2)

When using unprivileged containers, tty fails because of vhangup. Adding
--nohangup to nimgetty, it fixes the issue. This is the same problem
occurred for oracle template, commit 2e83f7201c5d402478b9849f0a85c62d5b9f1589

Signed-off-by: Claudio Alarcon clalarco@gmail.com
doc: Mention that veth.pair is ignored for unpriv

veth.pair is ignore for unprivileged containers as allowing an
unprivileged user to set a specific device name would allow them to
trigger actions in tools like NetworkManager or other uevent based
handlers that may react based on specific names or prefixes being used.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
doc: Add mention that veth.pair is ignored for unpriv in Japanese man

Update Japanese lxc.container.conf(5) for commit 8982c0f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-test-{unpriv,usernic.in}: make sure to chgrp as well

These tests are failing on new kernels because the container root is
not privileged over the directories, since privilege no requires
the group being mapped into the container.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Remove mention of mountcgroups in ubuntu.common config

That mount hook predates the lxc.mount.auto = cgroup option.  So mention
that instead.

Perhaps we should simply drop the mountcgroup hook from the tree, but
I'm not doing that in this patch.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
remove mountcgroup hook entirely

Also fix the comment in lxc-cirros template (which I overlooked last time).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Add SIGPWR support to lxc_init

This patch adds SIGPWR support to lxc_init.
This helps to properly shutdown lxc_init based containers.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Sysvinit script fixes

Signed-off-by: Stefano Ansaloni <ansalonistefano@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
unprivileged containers: use next available nic name if unspecified

Rather than always using eth0.  Otherwise unpriv containers cannot have
multiple lxc.network.type = veth's without manually setting
lxc.network.name =.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Support openvswitch bridges

We detect whether ovs-vsctl is available.  If so, then we support
adding network interfaces to openvswitch bridges with it.

Note that with this patch, veths do not appear to be removed from the
openvswitch bridge.  This seems a bug in openvswitch, as the veths
in fact do disappear from the system.  If lxc is required to remove
the port from the bridge manually, that becomes more complicated
for unprivileged containers, as it would require a setuid-root
wrapper to be called at shutdown.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
fix typo

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
fix typo in btrfs error msg

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>