Ensure that both /etc/systemd/network and /etc/systemd/system-preset exist before writing files into them. This fixes container creation from the docker.io/fedora & docker.io/ubuntu OCI images.
Signed-off-by: Filip Schauer <f.scha...@proxmox.com> --- Changed since v2: * rebase onto newest master (5a8b3f962f16) and re-format with proxmox-perltidy Introduced in v2 src/PVE/LXC/Setup/Base.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Setup/Base.pm b/src/PVE/LXC/Setup/Base.pm index 6bdfb8d..892bb50 100644 --- a/src/PVE/LXC/Setup/Base.pm +++ b/src/PVE/LXC/Setup/Base.pm @@ -313,6 +313,7 @@ DATA $data .= "IPv6AcceptRA = $accept_ra\n"; $data .= $routes if $routes; + $self->ct_make_path('/etc/systemd/network'); $self->ct_file_set_contents($filename, $data); } } @@ -352,7 +353,7 @@ sub setup_systemd_preset { } } - $self->ct_mkdir('/etc/systemd/system-preset', 0755); + $self->ct_make_path('/etc/systemd/system-preset'); $self->ct_file_set_contents( '/etc/systemd/system-preset/00-pve.preset', $preset_data, ); -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel