Merge pull request #16792 from poettering/machine-id-chroot

machine-id-setup: don't use KVM or container manager supplied uuid if…
This commit is contained in:
Anita Zhang
2020-08-19 23:21:56 -07:00
committed by GitHub
+1 -1
View File
@@ -44,7 +44,7 @@ static int generate_machine_id(const char *root, sd_id128_t *ret) {
fd = safe_close(fd);
}
if (isempty(root)) {
if (isempty(root) && running_in_chroot() <= 0) {
/* If that didn't work, see if we are running in a container,
* and a machine ID was passed in via $container_uuid the way
* libvirt/LXC does it */