diff options
author | Lukáš Nykrýn <lnykryn@redhat.com> | 2016-10-15 19:54:58 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-15 13:54:58 -0400 |
commit | 08a28eeca70eeefb55af61191b63e4c938daca73 (patch) | |
tree | 601fa6e79e6bfef61b0e50182016b3ffb0a0b5ce /src | |
parent | 7d862ab8c25d5c20eae6ed28c10c00c525c64a1f (diff) |
virt: add possibility to skip the check for chroot (#4374)
https://bugzilla.redhat.com/show_bug.cgi?id=1379852
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/virt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c index 10a2043746..41012d52a0 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -33,6 +33,7 @@ #include "string-table.h" #include "string-util.h" #include "virt.h" +#include "env-util.h" static int detect_vm_cpuid(void) { @@ -487,6 +488,9 @@ int detect_virtualization(void) { int running_in_chroot(void) { int ret; + if (getenv_bool("SYSTEMD_IGNORE_CHROOT") > 0) + return 0; + ret = files_same("/proc/1/root", "/"); if (ret < 0) return ret; |