From: Lennart Poettering Date: Tue, 24 Jan 2012 23:13:05 +0000 (+0100) Subject: virt: detect LXC+libvirt containers X-Git-Tag: v39~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d39db92c5e3d4f0448982639ba06ae442bb6226;p=systemd virt: detect LXC+libvirt containers --- diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 30559b99..eecff737 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -779,6 +779,7 @@ chroot, openvz, lxc, + lxc-libvirt, systemd-nspawn, pidns to test against a specific implementation. If diff --git a/src/virt.c b/src/virt.c index 380fabde..3f0912a8 100644 --- a/src/virt.c +++ b/src/virt.c @@ -209,6 +209,13 @@ int detect_container(const char **id) { *id = "lxc"; return 1; + } else if (streq(line, "container=lxc-libvirt")) { + fclose(f); + + if (id) + *id = "lxc-libvirt"; + return 1; + } else if (streq(line, "container=systemd-nspawn")) { fclose(f);