APIAGE followup: fix typo and print versions in error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2018-11-19 12:18:03 +01:00
parent 042dd4be1f
commit a0908caa99

View File

@ -77,10 +77,11 @@ if ( -d '/usr/share/perl5/PVE/Storage/Custom' ) {
if !$modname->can('api');
# Check storage API version and that file is really storage plugin.
my $version = $modname->api();
die "implements an API version newer than current\n"
die "implements an API version newer than current ($version > " . APIVER . ")\n"
if $version > APIVER;
die "API version too old, pluse update the plugin\n"
if $version < (APIVER-APIAGE);
my $min_version = (APIVER - APIAGE);
die "API version too old, please update the plugin ($version < $min_version)\n"
if $version < $min_version;
import $file;
$modname->register();