[lxc-devel] Detecting a non-root container

Cyril Brulebois kibi at debian.org
Tue Apr 5 19:23:39 UTC 2011


Hi LXC folks,

from my bug report against udev, so that it doesn't try to start when
running in a non-root container:

Marco d'Itri <md at Linux.IT> (05/04/2011):
> On Apr 05, Cyril Brulebois <kibi at debian.org> wrote:
> 
> > from a quick glance, it looks like running udev in a linux
> > container isn't supported, so I guess it might make sense to use a
> > check similar to is_chrooted in its postinst to decide whether to
> > start the daemon.
> No objections, but please come back with a detection method which is
> sanctioned by the LXC people.

Could you please advise on the best way to detect running in a
non-root container? It looks like grepping /proc/1/cgroup for :/$
could be a way to determine that (as opposed to :/foo$ in a "foo"
container). Can you please confirm?

Thanks already.

KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20110405/9078cf73/attachment.pgp>


More information about the lxc-devel mailing list