]> git.proxmox.com Git - pve-container.git/commit
clear machine-id: only truncate machine-id file if either it exists or systemd managed
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Jun 2021 16:15:45 +0000 (18:15 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Jun 2021 16:16:27 +0000 (18:16 +0200)
commitb2c3706f17467a3d8c69087e9614ae1a152c0d56
tree82834adea053c2de6d0a231289ac68d578d3a55d
parent6ef3baef6e29ffbcd79e929fc15089efed5cc7e7
clear machine-id: only truncate machine-id file if either it exists or systemd managed

Not nice to create empty /etc/machine-id files in, e.g., Alpine Linux
CTs.

The adaption of the else branch is not only an optimization to avoid
unlink call of non-existent file, but required as it not guaranteed
to be in the "no clone" case else anymore.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC/Setup/Base.pm