[lxc-devel] [patch 08/10] Store the container name in the handler

2010-02-04 Thread Daniel Lezcano
Store the container in the handler, so it is accessible everywhere. Signed-off-by: Daniel Lezcano --- src/lxc/start.c | 12 +++- src/lxc/start.h |1 + 2 files changed, 12 insertions(+), 1 deletion(-) Index: lxc/src/lxc/start.c ==

[lxc-devel] [patch 10/10] reboot the container at reboot

2010-02-04 Thread Daniel Lezcano
When the reboot is detected, reboot the container. Signed-off-by: Daniel Lezcano --- src/lxc/commands.c |7 +++ src/lxc/conf.c |6 -- src/lxc/conf.h |1 + src/lxc/confile.c | 30 +++--- src/lxc/lxc.h |3 ++- src/lxc/lxc_start.c

[lxc-devel] [patch 09/10] shutdown container when powering off the container

2010-02-04 Thread Daniel Lezcano
This patch allows to shutdown the container when the system is powered off in the container. Signed-off-by: Daniel Lezcano --- src/lxc/Makefile.am |6 +- src/lxc/start.c | 11 +++ src/lxc/utmp.c | 156 src/lxc/utmp.h | 2

[lxc-devel] [patch 05/10] rename network type enum

2010-02-04 Thread Daniel Lezcano
Use a prefixed enum to avoid conflict later. Signed-off-by: Daniel Lezcano --- src/lxc/conf.c| 14 +++--- src/lxc/conf.h| 12 ++-- src/lxc/confile.c | 10 +- 3 files changed, 18 insertions(+), 18 deletions(-) Index: lxc/src/lxc/conf.c ==

[lxc-devel] [patch 06/10] allocate a console to be proxied

2010-02-04 Thread Daniel Lezcano
The actual behaviour of the console is messy as: * it relies on a heuristic (tty or not, rootfs or not, etc ...) * the container init stole the tty and we lose the control The following patch: * allocates a tty * maps this tty to the container console * proxy the io from the console to the fi

[lxc-devel] [patch 07/10] count the number of tasks in the container

2010-02-04 Thread Daniel Lezcano
This patch adds a function to count the number of tasks in the container. Signed-off-by: Daniel Lezcano --- src/lxc/cgroup.c | 27 +++ src/lxc/cgroup.h |2 +- 2 files changed, 28 insertions(+), 1 deletion(-) Index: lxc/src/lxc/cgroup.c =

[lxc-devel] [patch 02/10] factor-out-console code

2010-02-04 Thread Daniel Lezcano
Factore out the console code and encapsulate the code in functions. Signed-off-by: Daniel Lezcano --- src/lxc/lxc_console.c | 67 -- 1 file changed, 43 insertions(+), 24 deletions(-) Index: lxc/src/lxc/lxc_console.c =

[lxc-devel] [patch 04/10] Fix header inclusion

2010-02-04 Thread Daniel Lezcano
No need to include the lxc_conf structure definition, a forward declaration is enough. Signed-off-by: Daniel Lezcano --- src/lxc/start.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: lxc/src/lxc/start.h ===

[lxc-devel] [patch 03/10] use a mainloop for the console

2010-02-04 Thread Daniel Lezcano
Use the mainloop to manage io of the console. Signed-off-by: Daniel Lezcano --- src/lxc/lxc_console.c | 163 ++ 1 file changed, 88 insertions(+), 75 deletions(-) Index: lxc/src/lxc/lxc_console.c ===

[lxc-devel] [patch 01/10] fix compilation warning

2010-02-04 Thread Daniel Lezcano
Add missing include Signed-off-by: Daniel Lezcano --- src/lxc/state.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: lxc/src/lxc/state.c === --- lxc.orig/src/lxc/state.c +++ lxc/src/lxc/state.c @@ -26,7 +26,7 @@ #

[lxc-devel] [patch 00/10] new enhancements

2010-02-04 Thread Daniel Lezcano
* console improvements * shutdown / poweroff / reboot support -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose

Re: [lxc-devel] [Lxc-users] Request for inclusion into mainline LXC utils

2010-02-04 Thread Guido Trotter
On Wed, Feb 3, 2010 at 7:34 PM, wrote: > It seems that we did not the same kind of utils. > You have made init.d, start, stop and status scripts (for debian-like > distro). > It could proposed to the debian package maintainer. Sure, I'd be happy to have contributions to the debian package! :) (b