Re: [lxc-devel] "Shutdown" LXC container

2011-05-23 Thread Christoph Mitasch
Hi Tobias, thanks for the detailed research on that. You are actually right and I got it working using sysvinit on Debian Squeeze. I just had to add the following line to /etc/inittab: ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now The lxc-debian template script creates a minimal /etc/inittab

Re: [lxc-devel] "Shutdown" LXC container

2011-05-16 Thread Tobias Gruetzmacher
Hi, On Mon, May 16, 2011 at 10:01:31AM +0200, Christoph Mitasch wrote: > the idea is actually good, but my experience is that modern Linux > distros are unable to shutdown with "kill -s INT/PWR". Well. I consider the default setup of your "modern" Linux distros broken. So pressing Ctrl+Alt+Del on

Re: [lxc-devel] "Shutdown" LXC container

2011-05-16 Thread Christoph Mitasch
Hi Tobi, the idea is actually good, but my experience is that modern Linux distros are unable to shutdown with "kill -s INT/PWR". I tested on Debian Squeeze and Ubuntu Natty and it didn't work. What distro are you using? Check this thread: http://www.mail-archive.com/lxc-users@lists.sourceforge.

[lxc-devel] "Shutdown" LXC container

2011-05-15 Thread Tobias Gruetzmacher
Hi, it bugged me that there is no "clean" way to shut down a full system container from the outside, so I wrote the attached helper script. It finds the "init" process for the container and sends the INT signal to that process, which most init systems (all?) interpret as a request to reboot the s