diff options
author | Roy Marples <roy@marples.name> | 2008-08-19 06:36:43 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-08-19 06:36:43 +0000 |
commit | 15678263d5285b912d9a5d4ff3d4ff9dd4b94734 (patch) | |
tree | affb24efea7f7721333f54b16e4902abe01339e1 | |
parent | cea206014d80e61e16f53a6c61577d063a7b75b8 (diff) |
Add new OpenVZ detection code
-rw-r--r-- | src/librc/librc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c index 227730d1..e97425ef 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -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; |