[Lxc-users] Executing a command inside a running container?
Ulli Horlacher
framstag at rus.uni-stuttgart.de
Sun Apr 17 09:01:17 UTC 2011
On Sun 2010-01-31 (13:38), Tony Risinger wrote:
> if your using the standard init program, and you are only trying to
> control stutdown/reboot, i use something like this in my container
> inittab:
>
> p6::ctrlaltdel:/sbin/init 6
> p0::powerfail:/sbin/init 0
>
> ctrlaltdel responds to a SIGINT, and powerfail responds to SIGPWR.
> this lets you send a:
>
> kill -INT <init pid>
>
> to reboot, and:
>
> kill -PWR <init pid>
>
> to shutdown.
Ubuntu has upstart instead of the classic init and upstart ignores INT and
PWR signals.
I could do a: ssh container "shutdown -h now"
But this needs a working networking and a sshd inside the container.
Is there a way to tell upstart to execute a shutdown or at least invoke
/etc/init/control-alt-delete.conf ?
--
Ullrich Horlacher Server- und Arbeitsplatzsysteme
Rechenzentrum E-Mail: horlacher at rus.uni-stuttgart.de
Universitaet Stuttgart Tel: ++49-711-685-65868
Allmandring 30 Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.rus.uni-stuttgart.de/
More information about the lxc-users
mailing list