mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 13:41:31 +00:00
virt: detect LXC+libvirt containers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user