forked from pool/systemd
26 lines
736 B
Diff
26 lines
736 B
Diff
|
From 893e72da6b27c21b102e1589276e651e9e4f591c Mon Sep 17 00:00:00 2001
|
||
|
From: Michal Sekletar <msekleta@redhat.com>
|
||
|
Date: Tue, 9 Sep 2014 18:14:25 +0200
|
||
|
Subject: [PATCH] virt: detect that we are running inside the docker container
|
||
|
|
||
|
---
|
||
|
src/shared/virt.c | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git src/shared/virt.c src/shared/virt.c
|
||
|
index b436895..f9c4e67 100644
|
||
|
--- src/shared/virt.c
|
||
|
+++ src/shared/virt.c
|
||
|
@@ -310,6 +310,8 @@ int detect_container(const char **id) {
|
||
|
_id = "lxc-libvirt";
|
||
|
else if (streq(e, "systemd-nspawn"))
|
||
|
_id = "systemd-nspawn";
|
||
|
+ else if (streq(e, "docker"))
|
||
|
+ _id = "docker";
|
||
|
else
|
||
|
_id = "other";
|
||
|
|
||
|
--
|
||
|
1.7.9.2
|
||
|
|