summaryrefslogtreecommitdiff
path: root/source4/setup/provision-backend
diff options
context:
space:
mode:
Diffstat (limited to 'source4/setup/provision-backend')
-rwxr-xr-xsource4/setup/provision-backend24
1 files changed, 14 insertions, 10 deletions
diff --git a/source4/setup/provision-backend b/source4/setup/provision-backend
index ada6dcef8d..54dc5839bf 100755
--- a/source4/setup/provision-backend
+++ b/source4/setup/provision-backend
@@ -22,14 +22,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+import os, sys
+
+sys.path.insert(0, "bin/python")
+
import getopt
import optparse
-import os, sys
import samba
-import param
+from samba import param
-from auth import system_session
+from samba.auth import system_session
import samba.getopt as options
from samba.provision import (provision_backend)
@@ -54,6 +57,8 @@ parser.add_option("--quiet", help="Be quiet", action="store_true")
parser.add_option("--ldap-backend-type", type="choice", metavar="LDAP-BACKEND-TYPE",
help="LDB mapping module to use for the LDAP backend",
choices=["fedora-ds", "openldap"])
+parser.add_option("--ldap-backend-port", type="int", metavar="PORT",
+ help="TCP Port LDAP server should listen to (default ldapi only)")
parser.add_option("--server-role", type="choice", metavar="ROLE",
choices=["domain controller", "dc", "member server", "member", "standalone"],
help="Set server role to provision for (default standalone)")
@@ -89,10 +94,9 @@ if setup_dir is None:
setup_dir = "setup"
provision_backend(setup_dir=setup_dir, message=message, smbconf=smbconf, targetdir=opts.targetdir,
- realm=opts.realm, domain=opts.domain,
- hostname=opts.host_name,
- adminpass=opts.ldap_manager_pass,
- root=opts.root, serverrole=server_role,
- ldap_backend_type=opts.ldap_backend_type)
-
-message("All OK")
+ realm=opts.realm, domain=opts.domain,
+ hostname=opts.host_name,
+ adminpass=opts.ldap_manager_pass,
+ root=opts.root, serverrole=server_role,
+ ldap_backend_type=opts.ldap_backend_type,
+ ldap_backend_port=opts.ldap_backend_port)