We have altogether three calls to this method, all in API context with already sanitizied ostype.
Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com> --- src/PVE/LXC.pm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index e3433fb..241c5b2 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -352,17 +352,14 @@ sub update_lxc_config { my $custom_idmap = grep { $_->[0] eq 'lxc.id_map' } @{$conf->{lxc}}; my $ostype = $conf->{ostype} || die "missing 'ostype' - internal error"; - if ($ostype =~ /^(?:debian | ubuntu | centos | fedora | opensuse | archlinux | alpine | gentoo | unmanaged)$/x) { - my $inc ="/usr/share/lxc/config/$ostype.common.conf"; - $inc ="/usr/share/lxc/config/common.conf" if !-f $inc; - $raw .= "lxc.include = $inc\n"; - if ($unprivileged || $custom_idmap) { - $inc = "/usr/share/lxc/config/$ostype.userns.conf"; - $inc = "/usr/share/lxc/config/userns.conf" if !-f $inc; - $raw .= "lxc.include = $inc\n" - } - } else { - die "implement me (ostype $ostype)"; + + my $inc ="/usr/share/lxc/config/$ostype.common.conf"; + $inc ="/usr/share/lxc/config/common.conf" if !-f $inc; + $raw .= "lxc.include = $inc\n"; + if ($unprivileged || $custom_idmap) { + $inc = "/usr/share/lxc/config/$ostype.userns.conf"; + $inc = "/usr/share/lxc/config/userns.conf" if !-f $inc; + $raw .= "lxc.include = $inc\n" } # WARNING: DO NOT REMOVE this without making sure that loop device nodes -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel