[lxc-devel] startup scripts for lxc containers?

Dietmar Maurer dietmar at proxmox.com
Mon Jan 18 17:22:06 UTC 2010


> > A work around would be to add in the latest shutdown script a write,
> > for
> > example to a fifo, which is read from the parent's init process in
> > order
> > to detect a shutdown. But we can not do the difference between a
> reboot
> > or a shutdown, that looks like a trick more than a real solution...
> 
> We can add a sysv script inside the container (like openvz does). That
> script can signal something to the init-logger, which can then close
> the pipe
> to the init-parent?

Wait, init already kills all container processes - so the init-logger also receives
a signal (or get killed). So the init-parent should be able to detect that (closed pipe)
an can then terminate init?

- Dietmar





More information about the lxc-devel mailing list