tests: rbd ns: exit cleanly on help, and allow short-opt -h

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2021-04-12 14:46:12 +02:00
parent 876d268298
commit 9407a7a338

View File

@ -47,12 +47,15 @@ GetOptions (
"use-existing" => \$use_existing,
"namespace=s" => \$namespace,
"vmid=i" => \$vmid,
"help" => \$showhelp,
"h|help" => \$showhelp,
"cleanup" => \$cleanup,
"debug" => \$DEBUG,
) or die ($helpstring);
die $helpstring if $showhelp;
if ($showhelp) {
warn $helpstring;
exit(0);
}
my $storage_name = "${pool}-${namespace}";