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
commit 174fff9acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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 */