oracle: Fix running template unprivileged

Without this /dev/console won't exist and upstart will fail to start any
job marking as "console output" including the rather important rcS.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Disable logpath for unprivileged containers

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
debian: Switch to config includes

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lxc_unshare -u argument useful even with USER namespace shared

Signed-off-by: Seth Robertson <srobertson@appcomsci.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Teach lxc_unshare about interfaces, mounts, hostname, daemonize

lxc_unshare now takes one or more '-i interfacename' arguments which
will move the named interfaces into the created container.

lxc_unshare now takes -M argument which will cause the standard mounts
(/proc /dev/shm /dev/mqueue) to be auto-mounted inside container.

lxc_unshare now takes '-H hostname' argument to automatically set
the hostname in the container.

lxc_unshare now takes -D argument to automatically daemonize and detach
from the created container, instead of waiting for the container to exit

Signed-off-by: Seth Robertson <srobertson@appcomsci.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lxc-unshare: uid_t is unsigned.

so we can't use uid==-1 as "don't do setuid"

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Add local definition of sethostname to lxc_unshare

sethostname doesn't exist on bionic, so copy/paste the definition of it
we have in conf.c

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
change version to 1.0.0.beta2 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Add missing entry to dist target

Apparently this file has gone over 5 years without getting into a dist
tarball!

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-create: Don't print the help message twice

The forking logic was wrong, causing both the child and the parent to
call the template with -h.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
ubuntu: Don't fail on invalid locale

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lxc-ubuntu-cloud: Fix cache and lock location

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Initial support for cgmanager

This patch splits out most of the cgroupfs-specific code, so that
cgroup-manager versions can be plugged in.  The case I did
not handle is cgroup_enter at lxc_attach.  I'm hoping that case can
be greatly simplified, but will worry about it after fleshing out the
cgroup manager handlers.

This also simplify the freezer functions.

This seems to not regress my common tests when running without
cgmanager, but I'd like to do a bit more testing before pushing.
However I was hoping to get some more eyes on this so am sending it
out now.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
implement cgmanager_remove_cgroup

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
stop cmd callback: unfreeze by path only

in particular, regular unfreeze uses the cmd api to request the cgroup
of the container.  If we are already in the lxc-start monitor, we can't
use the cmd api.

(I knew when I started this would be a problem but then as it didn't
reliably crash, I forgot to handle it)

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