virt: detect LXC+libvirt containers

This commit is contained in:
Lennart Poettering 2012-01-25 00:13:05 +01:00
parent caa9488700
commit 7d39db92c5
2 changed files with 8 additions and 0 deletions

View file

@ -779,6 +779,7 @@
<varname>chroot</varname>,
<varname>openvz</varname>,
<varname>lxc</varname>,
<varname>lxc-libvirt</varname>,
<varname>systemd-nspawn</varname>,
<varname>pidns</varname> to test
against a specific implementation. If

View file

@ -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);