pveceph: reuse supported ceph versions for non-default warning

albeit this is a bit odd safety "check" anyway

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-21 17:04:21 +02:00
parent 983921b9a1
commit 7271e6f67d

View File

@ -159,8 +159,8 @@ __PACKAGE__->register_method ({
}
PVE::Tools::file_set_contents("/etc/apt/sources.list.d/ceph.list", $repolist);
warn "WARNING: installing non-default ceph release '$cephver'!\n"
if $cephver !~ qr/^(?:octopus|pacific)$/;
my $supported_re = join('|', $supported_ceph_versions->@*);
warn "WARNING: installing non-default ceph release '$cephver'!\n" if $cephver !~ qr/^(?:$supported_re)$/;
local $ENV{DEBIAN_FRONTEND} = 'noninteractive';
print "update available package list\n";