ldap/admin/src/scripts/bak2db.pl.in | 4 ++--
ldap/admin/src/scripts/db2index.pl.in | 2 +-
ldap/admin/src/scripts/db2ldif.pl.in | 6 +++---
ldap/admin/src/scripts/dbverify.in | 8 ++++++--
ldap/admin/src/scripts/dn2rdn.in | 2 +-
ldap/admin/src/scripts/ldif2db.in | 9 ++++++++-
ldap/admin/src/scripts/ldif2db.pl.in | 6 +++---
ldap/admin/src/scripts/ns-accountstatus.pl.in | 4 ++--
ldap/admin/src/scripts/ns-activate.pl.in | 4 ++--
ldap/admin/src/scripts/upgradednformat.in | 2 +-
ldap/admin/src/scripts/verify-db.pl.in | 2 +-
11 files changed, 30 insertions(+), 19 deletions(-)
New commits:
commit 129b3aa8e4ec226e66b813a12dcdba029e848c66
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Mar 5 18:04:34 2013 -0500
Ticket 332 - Fix usage in scripts
Description: Fixed some minor issues with the usage in some of the scripts.
https://fedorahosted.org/389/ticket/332
Reviewed by: richm & Noriko(Thanks!)
diff --git a/ldap/admin/src/scripts/bak2db.pl.in b/ldap/admin/src/scripts/bak2db.pl.in
index 53a25cb..3ecd7cb 100644
--- a/ldap/admin/src/scripts/bak2db.pl.in
+++ b/ldap/admin/src/scripts/bak2db.pl.in
@@ -53,8 +53,8 @@ $dbtype = "ldbm database";
$i = 0;
sub usage {
- print(STDERR "Usage: bak2db.pl [-v] [-Z serverID] [-D rootdn] { -w password | -w
- | -j filename } -a dirname [-t dbtype]\n");
- print(STDERR " [-n backendname] [-P protocol] [-h]\n");
+ print(STDERR "Usage: bak2db.pl [-Z serverID] [-D rootdn] { -w password | -w - |
-j filename } -a dirname [-t dbtype]\n");
+ print(STDERR " [-n backendname] [-P protocol] [-v]
[-h]\n");
print(STDERR "Options:\n");
print(STDERR " -D rootdn - Directory Manager\n");
print(STDERR " -w password - Directory Manager's password\n");
diff --git a/ldap/admin/src/scripts/db2index.pl.in
b/ldap/admin/src/scripts/db2index.pl.in
index 125a123..f640f4c 100644
--- a/ldap/admin/src/scripts/db2index.pl.in
+++ b/ldap/admin/src/scripts/db2index.pl.in
@@ -54,7 +54,7 @@ $attr_count = 0;
$vlv_count = 0;
sub usage {
- print(STDERR "Usage: db2index.pl [-Z serverID] [-D rootdn] { -w password | -w -
| -j filename } [-n] [-P protocol]\n");
+ print(STDERR "Usage: db2index.pl [-Z serverID] [-D rootdn] { -w password | -w -
| -j filename } [-P protocol]\n");
print(STDERR " -n backendname [-t
attributeName[:indextypes[:matchingrules]]] [-T vlvTag] [-v] [-h]\n");
print(STDERR "Options:\n");
print(STDERR " -D rootdn - Directory Manager\n");
diff --git a/ldap/admin/src/scripts/db2ldif.pl.in b/ldap/admin/src/scripts/db2ldif.pl.in
index 5b8c001..d0865e8 100644
--- a/ldap/admin/src/scripts/db2ldif.pl.in
+++ b/ldap/admin/src/scripts/db2ldif.pl.in
@@ -65,9 +65,9 @@ $excli = 0;
$decrypt_on_export = 0;
sub usage {
- print(STDERR "Usage: db2index.pl [-v] [-Z serverID] [-D rootdn] { -w password |
-w - | -j pwfilename }\n");
- print(STDERR " [-P protocol]{-n backendname}* | {-s include}*
[{-x exclude}*]\n");
- print(STDERR " [-a filename] [-m] [-M] [-u] [-C] [-N] [-U] [-a
filename] [-h]\n");
+ print(STDERR "Usage: db2ldif.pl [-v] [-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");
print(STDERR " -D rootdn - Directory Manager\n");
print(STDERR " -w password - Directory Manager's
password\n");
diff --git a/ldap/admin/src/scripts/dbverify.in b/ldap/admin/src/scripts/dbverify.in
index 74ff9f4..c62168b 100755
--- a/ldap/admin/src/scripts/dbverify.in
+++ b/ldap/admin/src/scripts/dbverify.in
@@ -25,7 +25,7 @@ usage()
echo " -h - Display usage"
}
-while getopts "Z:n:hVfd:n:D:" flag
+while getopts "Z:n:hVvfd:n:D:" flag
do
case $flag in
h) usage
@@ -34,7 +34,8 @@ do
n) args=$args" -n $OPTARG";;
d) args=$args" -d $OPTARG";;
V) args=$args" -V";;
- v) args=$args" -v";;
+ v) args=$args" -v"
+ display_version="yes";;
f) args=$args" -f";;
D) args=$args" -D $OPTARG";;
?) usage
@@ -54,6 +55,9 @@ fi
configdir="@instconfigdir@/slapd-$servid"
@sbindir@/ns-slapd dbverify -D $configdir $args
+if [ $display_version == "yes" ]; then
+ exit 0
+fi
if [ $? -eq 0 ]; then
echo "DB verify: Passed"
exit 0
diff --git a/ldap/admin/src/scripts/dn2rdn.in b/ldap/admin/src/scripts/dn2rdn.in
index 32f2748..2379afe 100755
--- a/ldap/admin/src/scripts/dn2rdn.in
+++ b/ldap/admin/src/scripts/dn2rdn.in
@@ -12,7 +12,7 @@ export SHLIB_PATH
usage ()
{
- echo "Usage: db2rdn [-Z serverID] [-h] [-f] [-v] [-d debuglevel]"
+ echo "Usage: dn2rdn [-Z serverID] [-h] [-f] [-v] [-d debuglevel]"
echo "Options:"
echo " -Z serverID - Server instance identifier"
echo " -f - Force upgrade"
diff --git a/ldap/admin/src/scripts/ldif2db.in b/ldap/admin/src/scripts/ldif2db.in
index 428765c..92ac5f4 100755
--- a/ldap/admin/src/scripts/ldif2db.in
+++ b/ldap/admin/src/scripts/ldif2db.in
@@ -14,7 +14,7 @@ export SHLIB_PATH
usage()
{
echo "Usage: ldif2db [-Z serverID] -n backendname {-s includesuffix}* [{-x
excludesuffix}*] {-i ldiffile}*"
- echo " [-O] [-E] [-q] [-h]"
+ echo " [-c chunksize] [-g [string]] [-G namespace_id] [-O] [-E]
[-q] [-v] [-h]"
echo "Note: either \"-n backend\", \"-s includesuffix\", and
\"-i ldiffile\" are required."
echo "Options:"
echo " -Z serverID - The server instance identifier"
@@ -22,9 +22,16 @@ usage()
echo " -s inclduesuffix - Suffix to include"
echo " -x excludesuffix - Suffix to exclude"
echo " -i ldiffile - LDIF file name"
+ echo " -c chunksize - Number of entries to process before starting a
new pass"
+ echo " -g [string] - String is \"none\" or
\"deterministic\""
+ echo " \"none\" - unique id is not
generated"
+ echo " \"deterministic\" - generate name
based unique id (-G name)"
+ echo " By default - generate time based unique
id"
+ echo " -G name - Namespace id for name based uniqueid (-g
deterministic)"
echo " -O - Do not index the attributes"
echo " -E - Encrypt attributes"
echo " -q - Quiet mode - suppresses output"
+ echo " -v - Verbose output"
echo " -h - Display usage"
}
diff --git a/ldap/admin/src/scripts/ldif2db.pl.in b/ldap/admin/src/scripts/ldif2db.pl.in
index b61dc67..68af2a4 100644
--- a/ldap/admin/src/scripts/ldif2db.pl.in
+++ b/ldap/admin/src/scripts/ldif2db.pl.in
@@ -60,8 +60,8 @@ $encrypt_on_import = 0;
sub usage {
print(STDERR "Usage: ldif2db.pl -n backend [-Z serverID] [-D rootdn] { -w
password | -w - | -j filename }\n");
- print(STDERR " [-P protocol] {-s include}* [{-x exclude}*] [-O]
[-c] [-v] [-h] [-g [string]]\n");
- print(STDERR " [-G namespace_id] {-i filename}*\n");
+ print(STDERR " [-P protocol] {-s include}* [{-x exclude}*] [-O]
[-c chunksize] [-v] [-h]\n");
+ print(STDERR " [-E] [-g [string] [-G namespace_id]] {-i
filename}*\n");
print(STDERR "Note: either \"-n backend\", \"-s
includesuffix\", and \"-i ldiffile\" are required.\n");
print(STDERR "Options:\n");
print(STDERR " -D rootdn - Directory Manager\n");
@@ -74,7 +74,7 @@ sub usage {
print(STDERR " -s include - Included suffix\n");
print(STDERR " -x exclude - Excluded suffix(es)\n");
print(STDERR " -O - Only create core db, no attr
indexes\n");
- print(STDERR " -c size - Merge chunk size\n");
+ print(STDERR " -c chunksize - Number of entries to process before
starting a new pass\n");
print(STDERR " -g [string] - String is \"none\" or
\"deterministic\"\n");
print(STDERR " \"none\" - unique id is not
generated\n");
print(STDERR " \"deterministic\" - generate
name based unique id (-G name)\n");
diff --git a/ldap/admin/src/scripts/ns-accountstatus.pl.in
b/ldap/admin/src/scripts/ns-accountstatus.pl.in
index 2f99d5d..7e492f3 100644
--- a/ldap/admin/src/scripts/ns-accountstatus.pl.in
+++ b/ldap/admin/src/scripts/ns-accountstatus.pl.in
@@ -56,8 +56,8 @@ $role = 0;
sub usage
{
- print (STDERR "$cmd [-Z serverID] [-D rootdn] { -w password | -w - | -j filename
} \n");
- print (STDERR " [-p port] [-h host] [-P protocol] -I
DN-to-$operation\n\n");
+ print (STDERR "ns-accountstatus.pl [-Z serverID] [-D rootdn] { -w password | -w
- | -j filename } \n");
+ print (STDERR " [-p port] [-h host] [-P protocol] -I
DN-to-$operation\n\n");
print (STDERR "May be used to $operation a user or a domain of
users\n\n");
print (STDERR "Arguments:\n");
print (STDERR " -? - Display usage\n");
diff --git a/ldap/admin/src/scripts/ns-activate.pl.in
b/ldap/admin/src/scripts/ns-activate.pl.in
index 6d8b256..7497caf 100644
--- a/ldap/admin/src/scripts/ns-activate.pl.in
+++ b/ldap/admin/src/scripts/ns-activate.pl.in
@@ -56,8 +56,8 @@ $role = 0;
sub usage
{
- print (STDERR "$cmd [-Z serverID] [-D rootdn] { -w password | -w - | -j filename
} \n");
- print (STDERR " [-p port] [-h host] [-P protocol] -I
DN-to-$operation\n\n");
+ print (STDERR "ns-activate.pl [-Z serverID] [-D rootdn] { -w password | -w - |
-j filename } \n");
+ print (STDERR " [-p port] [-h host] [-P protocol] -I
DN-to-$operation\n\n");
print (STDERR "May be used to $operation a user or a domain of
users\n\n");
print (STDERR "Arguments:\n");
print (STDERR " -? - Display usage\n");
diff --git a/ldap/admin/src/scripts/upgradednformat.in
b/ldap/admin/src/scripts/upgradednformat.in
index d30ba42..560db96 100755
--- a/ldap/admin/src/scripts/upgradednformat.in
+++ b/ldap/admin/src/scripts/upgradednformat.in
@@ -21,7 +21,7 @@ export SHLIB_PATH
usage ()
{
- echo "Usage: $0 -n backendname -a database_directory [-Z serverID] [-N]
[-h]"
+ echo "Usage: upgradednformat -n backendname -a database_directory [-Z serverID]
[-N] [-h]"
echo "Options:"
echo " -n backendname - Backend name"
echo " -a database_directory - Path to database directory"
diff --git a/ldap/admin/src/scripts/verify-db.pl.in
b/ldap/admin/src/scripts/verify-db.pl.in
index c829bb4..1bf5fb5 100644
--- a/ldap/admin/src/scripts/verify-db.pl.in
+++ b/ldap/admin/src/scripts/verify-db.pl.in
@@ -50,7 +50,7 @@ my $i = 0;
sub usage
{
- print "Usage: $0 [-Z serverID] [ -a <fullpath_to_db_dir> ] [-h]\n";
+ print "Usage: verify-db.pl [-Z serverID] [ -a <fullpath_to_db_dir> ]
[-h]\n";
}
# getDbDir checks up to 4 levels of db dirs