summaryrefslogtreecommitdiff
path: root/examples/LDAP
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-08-27 14:44:36 +0000
committerGerald Carter <jerry@samba.org>2003-08-27 14:44:36 +0000
commitbdccf7fca84e0fd6c43c89f3337a316f22109579 (patch)
tree955203c7d3a6896f4209ec179d55332d1ae0621e /examples/LDAP
parent35a42eebed17c3caa61062fadc23d0130da71060 (diff)
downloadsamba-bdccf7fca84e0fd6c43c89f3337a316f22109579.tar.gz
samba-bdccf7fca84e0fd6c43c89f3337a316f22109579.tar.bz2
samba-bdccf7fca84e0fd6c43c89f3337a316f22109579.zip
add --help to script
(This used to be commit 5b20494aff3da9414ac0100220de96750c3f06a3)
Diffstat (limited to 'examples/LDAP')
-rwxr-xr-xexamples/LDAP/convertSambaAccount9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/LDAP/convertSambaAccount b/examples/LDAP/convertSambaAccount
index 61e80e1b7b..d2770c75a6 100755
--- a/examples/LDAP/convertSambaAccount
+++ b/examples/LDAP/convertSambaAccount
@@ -35,6 +35,7 @@ sub usage {
print "convertSambaAccount <options>\n";
print "Options:\n";
+ print " --help print this help message\n";
print " --input input LDIF filename\n";
print " --output output LDIF filename\n";
print " --sid domain SID\n";
@@ -77,7 +78,8 @@ sub usage {
## process command line args
##
-$result = GetOptions(\%options,
+$result = GetOptions(\%options,
+ "help",
"input=s",
"output=s",
"sid=s",
@@ -88,6 +90,11 @@ if (!$result && ($#ARGV != -1)) {
exit 1;
}
+if ( defined($options{'help'}) ) {
+ usage();
+ exit 0;
+}
+
if ( !defined( $options{'sid'} ) ) {
print "You must provide a domain sid\n";