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:
@ -47,12 +47,15 @@ GetOptions (
|
|||||||
"use-existing" => \$use_existing,
|
"use-existing" => \$use_existing,
|
||||||
"namespace=s" => \$namespace,
|
"namespace=s" => \$namespace,
|
||||||
"vmid=i" => \$vmid,
|
"vmid=i" => \$vmid,
|
||||||
"help" => \$showhelp,
|
"h|help" => \$showhelp,
|
||||||
"cleanup" => \$cleanup,
|
"cleanup" => \$cleanup,
|
||||||
"debug" => \$DEBUG,
|
"debug" => \$DEBUG,
|
||||||
) or die ($helpstring);
|
) or die ($helpstring);
|
||||||
|
|
||||||
die $helpstring if $showhelp;
|
if ($showhelp) {
|
||||||
|
warn $helpstring;
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
my $storage_name = "${pool}-${namespace}";
|
my $storage_name = "${pool}-${namespace}";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user