summaryrefslogtreecommitdiffstats
path: root/src/basic
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-26 14:13:53 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-29 15:36:26 +0200
commit90fb1f09386fd5d9e06ae8d589825bb3f5cd7777 (patch)
tree176a833b3040c9cbdff56dc61e043768e38b7320 /src/basic
parentbasic/virt: try the /proc/1/sched hack also for PID1 (diff)
downloadsystemd-90fb1f09386fd5d9e06ae8d589825bb3f5cd7777.tar.xz
systemd-90fb1f09386fd5d9e06ae8d589825bb3f5cd7777.zip
basic/virt: treat "podman" as separate container type
We would detect podman as container-other. Let's assign a name to it. Inspired by https://github.com/containers/libpod/issues/2996.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/virt.c2
-rw-r--r--src/basic/virt.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 1a213bb22e..0a1c729470 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -436,6 +436,7 @@ int detect_container(void) {
{ "lxc-libvirt", VIRTUALIZATION_LXC_LIBVIRT },
{ "systemd-nspawn", VIRTUALIZATION_SYSTEMD_NSPAWN },
{ "docker", VIRTUALIZATION_DOCKER },
+ { "podman", VIRTUALIZATION_PODMAN },
{ "rkt", VIRTUALIZATION_RKT },
{ "wsl", VIRTUALIZATION_WSL },
};
@@ -655,6 +656,7 @@ static const char *const virtualization_table[_VIRTUALIZATION_MAX] = {
[VIRTUALIZATION_LXC] = "lxc",
[VIRTUALIZATION_OPENVZ] = "openvz",
[VIRTUALIZATION_DOCKER] = "docker",
+ [VIRTUALIZATION_PODMAN] = "podman",
[VIRTUALIZATION_RKT] = "rkt",
[VIRTUALIZATION_WSL] = "wsl",
[VIRTUALIZATION_CONTAINER_OTHER] = "container-other",
diff --git a/src/basic/virt.h b/src/basic/virt.h
index c0836897f6..26f409afd0 100644
--- a/src/basic/virt.h
+++ b/src/basic/virt.h
@@ -31,6 +31,7 @@ enum {
VIRTUALIZATION_LXC,
VIRTUALIZATION_OPENVZ,
VIRTUALIZATION_DOCKER,
+ VIRTUALIZATION_PODMAN,
VIRTUALIZATION_RKT,
VIRTUALIZATION_WSL,
VIRTUALIZATION_CONTAINER_OTHER,