Is there an unhacky way of knowing if a script runs inside a
container? In my case, a sysV initscript that tries to load some
kernel modules needs to know if it runs inside the container, because
it must not load the modules in that case.

The hacky way I came across so far was checking the control group of PID 1.

Checking /proc/1/environ is considered OK? Or are there better ways?

Thanks.
Christoph
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to