mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
virt: detect LXC+libvirt containers
This commit is contained in:
parent
caa9488700
commit
7d39db92c5
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user