add auto detection for lxc

Reported-by: Francesco Riosa <francesco+gentoo_bugzilla@pnpitalia.it>
X-Gentoo-Bug: 384151
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=384151
This commit is contained in:
William Hubbs 2011-09-27 13:56:40 -05:00
parent 5a3599df8a
commit f46626dcfc

View File

@ -281,6 +281,8 @@ rc_sys_v1(void)
else if (file_regex("/proc/self/status",
"envID:[[:space:]]*[1-9]"))
return RC_SYS_OPENVZ; /* old test */
else if (file_regex("/proc/1/environ", "container=lxc"))
return RC_SYS_LXC;
#endif
return NULL;