Blame SOURCES/0046-Ticket-49261-Fix-script-usage-and-man-pages.patch

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