[lxc-devel] detecting reboot/halt...

Michael Tokarev mjt at tls.msk.ru
Thu Apr 8 07:59:01 UTC 2010


08.04.2010 11:56, Michael Tokarev wrote:
[]
> The problem. The current detection is based on the
> content of container's /var/run/utmp. This is goood
> provided the container actually touches that file,
> but this is not true for "single-application"
> containers, i.e. the ones without full init.d
> system.

And one more problem: this does not work if the container
mounts a separate tmpfs on top of /var/run (which is
quite typical nowadays).  (Sure it can be mounted from
the outside too, in which case the detection will work,
but the point is that this detection is quite fragile).

/mjt





More information about the lxc-devel mailing list