APIAGE followup: fix typo and print versions in error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -77,10 +77,11 @@ if ( -d '/usr/share/perl5/PVE/Storage/Custom' ) {
|
|||||||
if !$modname->can('api');
|
if !$modname->can('api');
|
||||||
# Check storage API version and that file is really storage plugin.
|
# Check storage API version and that file is really storage plugin.
|
||||||
my $version = $modname->api();
|
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;
|
if $version > APIVER;
|
||||||
die "API version too old, pluse update the plugin\n"
|
my $min_version = (APIVER - APIAGE);
|
||||||
if $version < (APIVER-APIAGE);
|
die "API version too old, please update the plugin ($version < $min_version)\n"
|
||||||
|
if $version < $min_version;
|
||||||
import $file;
|
import $file;
|
||||||
$modname->register();
|
$modname->register();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user