]> err.no Git - systemd/commitdiff
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 30559b99f891094730c2b6e053dba0a2d03759ad..eecff7373a512e342d7768950df269db1ac44779 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 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);