andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
74ca47
From c0a50f26aa52bda451c5b5bce7fa2c7c2eb90fe6 Mon Sep 17 00:00:00 2001
74ca47
From: Mark Reynolds <mreynolds@redhat.com>
74ca47
Date: Wed, 17 May 2017 16:24:50 -0400
74ca47
Subject: [PATCH] Ticket 49261 - Fix script usage and man pages
74ca47
74ca47
Description:  We incorrectly said db2bak.pl and db2ldif.pl took a "-v" option,
74ca47
              but they did not.  Plus the usage for some of the shell scripts
74ca47
              did not display "-v" option in the usage
74ca47
74ca47
https://pagure.io/389-ds-base/issue/49261
74ca47
74ca47
Reviewed by: tbordaz(Thanks!)
74ca47
---
74ca47
 ldap/admin/src/scripts/db2bak.in     | 3 ++-
74ca47
 ldap/admin/src/scripts/db2bak.pl.in  | 2 +-
74ca47
 ldap/admin/src/scripts/db2index.in   | 3 ++-
74ca47
 ldap/admin/src/scripts/db2ldif.in    | 3 ++-
74ca47
 ldap/admin/src/scripts/db2ldif.pl.in | 2 +-
74ca47
 ldap/admin/src/scripts/vlvindex.in   | 3 ++-
74ca47
 man/man8/vlvindex.8                  | 6 +++++-
74ca47
 7 files changed, 15 insertions(+), 7 deletions(-)
74ca47
74ca47
diff --git a/ldap/admin/src/scripts/db2bak.in b/ldap/admin/src/scripts/db2bak.in
74ca47
index e773b28..a13d2e2 100755
74ca47
--- a/ldap/admin/src/scripts/db2bak.in
74ca47
+++ b/ldap/admin/src/scripts/db2bak.in
74ca47
@@ -13,11 +13,12 @@ export SHLIB_PATH
74ca47
 
74ca47
 usage()
74ca47
 {
74ca47
-    echo "Usage: db2bak [archivedir] [-Z serverID] [-q] [-h]"
74ca47
+    echo "Usage: db2bak [archivedir] [-Z serverID] [-q] [-v] [-h]"
74ca47
     echo "Options:"
74ca47
     echo "        archivedir   - Directory where the backup should be stored"
74ca47
     echo "        -Z serverID  - Server instance identifier"
74ca47
     echo "        -q           - Quiet mode - suppresses output"
74ca47
+    echo "        -v           - Display version"
74ca47
     echo "        -h           - Display usage"  
74ca47
 }
74ca47
 
74ca47
diff --git a/ldap/admin/src/scripts/db2bak.pl.in b/ldap/admin/src/scripts/db2bak.pl.in
74ca47
index 73d4187..335285e 100644
74ca47
--- a/ldap/admin/src/scripts/db2bak.pl.in
74ca47
+++ b/ldap/admin/src/scripts/db2bak.pl.in
74ca47
@@ -25,7 +25,7 @@ $dbtype = "ldbm database";
74ca47
 $i = 0;
74ca47
 
74ca47
 sub usage {
74ca47
-    print(STDERR "Usage: db2bak.pl [-v] [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-a backupdir]\n");
74ca47
+    print(STDERR "Usage: db2bak.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-a backupdir]\n");
74ca47
     print(STDERR "                 [-t dbtype] [-P protocol] [-h]\n");
74ca47
     print(STDERR "Options:\n");
74ca47
     print(STDERR "        -D rootdn     - Directory Manager\n");
74ca47
diff --git a/ldap/admin/src/scripts/db2index.in b/ldap/admin/src/scripts/db2index.in
74ca47
index 04183d3..3fc4c2c 100755
74ca47
--- a/ldap/admin/src/scripts/db2index.in
74ca47
+++ b/ldap/admin/src/scripts/db2index.in
74ca47
@@ -14,7 +14,7 @@ export SHLIB_PATH
74ca47
 usage ()
74ca47
 {
74ca47
     echo "Usage: db2index [-Z serverID] [-n backend | {-s includesuffix}* -t attribute[:indextypes[:matchingrules]]"
74ca47
-    echo "                -T vlvTag] [-h]"
74ca47
+    echo "                -T vlvTag] [-v] [-h]"
74ca47
     echo "Options:"
74ca47
     echo "        -Z serverID       - Server instance identifier"
74ca47
     echo "        -n backend        - Backend database name.  Example: userRoot"
74ca47
@@ -26,6 +26,7 @@ usage ()
74ca47
     echo "                          - matchingrules: comma separated matrules"
74ca47
     echo "                                 Example: -t foo:eq,pres"
74ca47
     echo "        -T vlvTag         - VLV index name"
74ca47
+    echo "        -v                - Display version"
74ca47
     echo "        -h                - Display usage" 
74ca47
 }
74ca47
 
74ca47
diff --git a/ldap/admin/src/scripts/db2ldif.in b/ldap/admin/src/scripts/db2ldif.in
74ca47
index 08f30e4..95d2754 100755
74ca47
--- a/ldap/admin/src/scripts/db2ldif.in
74ca47
+++ b/ldap/admin/src/scripts/db2ldif.in
74ca47
@@ -16,7 +16,7 @@ cwd=`pwd`
74ca47
 usage()
74ca47
 {
74ca47
     echo "Usage: db2ldif [-Z serverID] {-n backend_instance}* | {-s includesuffix}* [{-x excludesuffix}*] [-a outputfile]"
74ca47
-    echo "               [-E] [-r] [-u] [-U] [-m] [-1] [-q] [-h]"
74ca47
+    echo "               [-E] [-r] [-u] [-U] [-m] [-1] [-q] [-v] [-h]"
74ca47
     echo "Note: either \"-n backend\" or \"-s includesuffix\" is required."
74ca47
     echo "Options:"
74ca47
     echo "        -Z serverID       - Server instance identifier"
74ca47
@@ -31,6 +31,7 @@ usage()
74ca47
     echo "        -m                - Do not base64 encode values"
74ca47
     echo "        -1                - Do not include version text"
74ca47
     echo "        -q                - Quiet mode - suppresses output"
74ca47
+    echo "        -v                - Display version"
74ca47
     echo "        -h                - Display usage" 
74ca47
 }
74ca47
 
74ca47
diff --git a/ldap/admin/src/scripts/db2ldif.pl.in b/ldap/admin/src/scripts/db2ldif.pl.in
74ca47
index 179d236..0d220f0 100644
74ca47
--- a/ldap/admin/src/scripts/db2ldif.pl.in
74ca47
+++ b/ldap/admin/src/scripts/db2ldif.pl.in
74ca47
@@ -38,7 +38,7 @@ $decrypt_on_export = 0;
74ca47
 $cwd = cwd();
74ca47
 
74ca47
 sub usage {
74ca47
-    print(STDERR "Usage: db2ldif.pl [-v] [-Z serverID] [-D rootdn] { -w password | -w - | -j pwfilename }\n");
74ca47
+    print(STDERR "Usage: db2ldif.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j pwfilename }\n");
74ca47
     print(STDERR "                  [-P protocol] {-n backendname}* | {-s include}* [{-x exclude}*] [-h]\n");
74ca47
     print(STDERR "                  [-a filename] [-m] [-M] [-r] [-u] [-C] [-N] [-U] [-E] [-1] [-a filename]\n");
74ca47
     print(STDERR "Options:\n");
74ca47
diff --git a/ldap/admin/src/scripts/vlvindex.in b/ldap/admin/src/scripts/vlvindex.in
74ca47
index ba2a2b3..6820de4 100755
74ca47
--- a/ldap/admin/src/scripts/vlvindex.in
74ca47
+++ b/ldap/admin/src/scripts/vlvindex.in
74ca47
@@ -13,7 +13,7 @@ export SHLIB_PATH
74ca47
 
74ca47
 usage ()
74ca47
 {
74ca47
-    echo "Usage: vlvindex [-Z serverID] -n backendname | {-s includesuffix}* -T vlvTag [-d debuglevel] [-h]"
74ca47
+    echo "Usage: vlvindex [-Z serverID] -n backendname | {-s includesuffix}* -T vlvTag [-d debuglevel] [-v] [-h]"
74ca47
     echo "Note: either \"-n backend\" or \"-s includesuffix\" are required."
74ca47
     echo "Options:"
74ca47
     echo "        -Z serverID        - Server instance identifier"
74ca47
@@ -21,6 +21,7 @@ usage ()
74ca47
     echo "        -s includessuffix  - Suffix to index"
74ca47
     echo "        -T vlvTag          - VLV index name"
74ca47
     echo "        -d debuglevel      - Debugging level"
74ca47
+    echo "        -v                 - Display version"
74ca47
     echo "        -h                 - Display usage"
74ca47
 }
74ca47
 
74ca47
diff --git a/man/man8/vlvindex.8 b/man/man8/vlvindex.8
74ca47
index f3e1748..4d9497a 100644
74ca47
--- a/man/man8/vlvindex.8
74ca47
+++ b/man/man8/vlvindex.8
74ca47
@@ -18,7 +18,7 @@
74ca47
 .SH NAME 
74ca47
 vlvindex - Directory Server script for VLV indexing
74ca47
 .SH SYNOPSIS
74ca47
-vlvindex [\-Z serverID] \-n backendname | {\-s includesuffix}* \-T vlvTag [\-d debuglevel] [\-h]
74ca47
+vlvindex [\-Z serverID] \-n backendname | {\-s includesuffix}* \-T vlvTag [\-d debuglevel] [\-v] [\-h]
74ca47
 .SH DESCRIPTION
74ca47
 Creates virtual list view (VLV) indexes, known in the Directory Server Console as browsing indexes. VLV indexes introduce flexibility in the way search results are viewed.  VLV index configuration must already exist prior to running this script. The Directory Server must be stopped before running this script.
74ca47
 .SH OPTIONS
74ca47
@@ -40,6 +40,10 @@ This is the name of the vlv index entry under cn=config.
74ca47
 .B \fB\-d\fR \fIDebug Level\fR
74ca47
 Settings the debugging level.
74ca47
 .TP
74ca47
+.B \fB\-v\fR
74ca47
+.br
74ca47
+Display the version.
74ca47
+.TP
74ca47
 .B \fB\-h\fR
74ca47
 .br
74ca47
 Display the usage.
74ca47
-- 
74ca47
2.9.4
74ca47