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

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