s4-dns: fixed CNAME automatic DNS updates
[samba.git] / source4 / scripting / bin / samba3dump
index 8f56d423d8cef16ef84a0af2ba75af9b249f638f..c11f8dbd0d74b86b6034b706e74ef2dfb78ebe57 100755 (executable)
@@ -7,11 +7,14 @@
 
 import optparse
 import os, sys
-sys.path.append(os.path.join(os.path.dirname(__file__), "../python"))
+
+# Find right directory when running from source tree
+sys.path.insert(0, "bin/python")
+
 import samba
 import samba.samba3
 
-parser = optparse.OptionParser("provision <libdir> [<smb.conf>]")
+parser = optparse.OptionParser("samba3dump <libdir> [<smb.conf>]")
 parser.add_option("--format", type="choice", metavar="FORMAT",
                   choices=["full", "summary"])
 
@@ -93,7 +96,7 @@ def print_samba3_secrets(secrets):
 
 def print_samba3_regdb(regdb):
     print_header("Registry")
-    from registry import str_regtype
+    from samba.registry import str_regtype
 
     for k in regdb.keys():
         print "[%s]" % k