Prefix the test binaries by lxc-test-

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-pkgconfig-dir

Put pkg-config .pc file in libdir.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
python-lxc: Always convert state passed to wait() to uppercase

At Serge's suggestion, always convert the state passed to the wait()
function in the python API to its uppercase equivalent.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
fix compile without apparmor (against git staging)

Add a few missing #if's to fix compilation when configured without
AppArmor.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
fix gcc error: typedef redefinition (against git staging)

Fix gcc error confile.c:83: error: redefinition of typedef ‘config_cb’.
Its already defined the same way in confile.h.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
lxc-doc-synopsis-args

I was getting raw nroff ".SH DESCRIPTION" in my man pages. This fixes
the synopsis cmd args so that doesn't happen. Added replaceable to a few
arguments.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
lxc-rpm-build

Fix building of rpm by non-root user. Include templates in rpm, fix rpm path of
lxc-init.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
fix expansion of LXCPATH,LXCROOTFSMOUNT,LXCTEMPLATEDIR

These variables are not expanded correctly in doc/lxc-create.sgml.in
and a workaround is in place to ensure ${localstatedir}, and ${datadir}
are set in the various shell scripts that use it. There is no workaround
to ensure ${datadir} is set in src/lxc/lxc-create.in, nor is
${localstatedir} set in templates/lxc-altlinux.in so I think that these
are currently broken.

Using AS_AC_EXPAND instead of AC_SUBST fixes these problems and removes
the need for the workarounds. In addition the lxc-start-ephemeral.in
script can be autoconf'ed instead of sed'ed by the makefile.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
lxc-start-ephemeral: Fix typo causing crash at startup

Apparently a ")" was dropped in a recent change, causing
lxc-start-ephemeral to fail to start completely (invalid syntax).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-start-ephemeral: Add missing return call to wait override

When overriding wait(), I forgot to actually return the value coming
from the C binding...

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
busybox: for all lib dirs create mounts only if directories exist

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
lxc-busybox: Use relative mounts in lxc.mount.entry

To make it easier to clone/rename the container, replace hardcoded
entries (with rootfs in the destination path) by rootfs-relative entries.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-ls: Use readlink on $directory

lxc-ls was failing in cases where $directory is a symlink to another
directory. Instead have $directory be generated from the output of
readlink -f "$lxc_path".

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-start-ephemeral: Drop stop() calls when shutdown() returns non-True

shutdown() when given a timeout already does a stop call so there's no
need to check its return value and do another one.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-start-ephemeral: Exit with command return code

When using lxc-start-ephemeral to directly call a command, return
ssh's return code (the command's return code) when exiting.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
lxc-start-ephemeral: startup time improvement

Re-organize the code to only call get_ips() when we actually need
the IP address of the container.

Also bump the timeout for get_ips() from 5s to 10s to accomodate
slower machines.

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