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