summaryrefslogtreecommitdiff
path: root/src/condition.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-14 23:41:47 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-14 23:41:47 +0100
commit2fc9784656900c4dc3715db506096ddc23fdd87c (patch)
tree206971c3cd2ab712d6be0a2f98fdebe99748f9dc /src/condition.c
parent1f16b4a6c496288aa62dc2ac973f88ca6c801b5d (diff)
container: skip a few things when we are run in a container such as accessing /proc/cmdline
Diffstat (limited to 'src/condition.c')
-rw-r--r--src/condition.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/condition.c b/src/condition.c
index 1d6cf12ad4..1dce276c00 100644
--- a/src/condition.c
+++ b/src/condition.c
@@ -67,6 +67,9 @@ static bool test_kernel_command_line(const char *parameter) {
assert(parameter);
+ if (detect_virtualization(NULL) > 0)
+ return false;
+
if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
return false;