From 15678263d5285b912d9a5d4ff3d4ff9dd4b94734 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 19 Aug 2008 06:36:43 +0000 Subject: Add new OpenVZ detection code --- src/librc/librc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/librc/librc.c') 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; -- cgit v1.2.3