]> git.proxmox.com Git - pve-storage.git/commitdiff
tests: rbd ns: exit cleanly on help, and allow short-opt -h
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Apr 2021 12:46:12 +0000 (14:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Apr 2021 12:46:12 +0000 (14:46 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
test/rbd_namespace.pl

index 5798bf167908718766dd260255d75ac5620ee072..1609d76140bec35fe45a06df375c90f3e8327ffb 100755 (executable)
@@ -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}";