chiark / gitweb /
virt: detect LXC+libvirt containers
[elogind.git] / src / virt.c
index 380fabded278184dd33a5ccee9b8c0dd51f35545..3f0912a8a6610b1c971666769608c1aab8b05710 100644 (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);