chiark / gitweb /
virt: detect LXC+libvirt containers
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Jan 2012 23:13:05 +0000 (00:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Jan 2012 23:13:05 +0000 (00:13 +0100)
man/systemd.unit.xml
src/virt.c

index 30559b9..eecff73 100644 (file)
                                 <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
index 380fabd..3f0912a 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);