Add new OpenVZ detection code

This commit is contained in:
Roy Marples 2008-08-19 06:36:43 +00:00
parent cea206014d
commit 15678263d5

View File

@ -230,9 +230,11 @@ const char *rc_sys(void)
else if (file_regex("/proc/self/status",
"(s_context|VxID):[[:space:]]*[1-9]"))
return RC_SYS_VSERVER;
else if (exists("/proc/vz/veinfo") && !exists("/proc/vz/version"))
return RC_SYS_OPENVZ;
else if (file_regex("/proc/self/status",
"envID:[[:space:]]*[1-9]"))
return RC_SYS_OPENVZ;
return RC_SYS_OPENVZ; /* old test */
#endif
return NULL;