mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
machine-id-setup: don't use KVM or container manager supplied uuid if in chroot env
Fixes: #16758
This commit is contained in:
parent
caf6bd166f
commit
1f894e682c
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user