andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

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

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