summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/setup_ldap.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/setup/setup_ldap.py')
-rw-r--r--pykolab/setup/setup_ldap.py64
1 files changed, 13 insertions, 51 deletions
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index de371b4..2650fa8 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -60,48 +60,15 @@ def cli_options():
help = _("Allow anonymous binds (default: no).")
)
- ldap_group.add_option(
- "--without-ldap",
- dest = "without_ldap",
- action = "store_true",
- default = False,
- help = _("Skip setting up the LDAP server.")
- )
-
- ldap_group.add_option(
- "--with-openldap",
- dest = "with_openldap",
- action = "store_true",
- default = False,
- help = _("Setup configuration for OpenLDAP compatibility.")
- )
-
def description():
return _("Setup LDAP.")
def execute(*args, **kw):
-
ask_questions = True
if not conf.config_file == conf.defaults.config_file:
ask_questions = False
- if conf.without_ldap:
- print >> sys.stderr, _("Skipping setup of LDAP, as specified")
- return
-
- _input = {}
-
- if conf.with_openldap:
-
- conf.command_set('ldap', 'unique_attribute', 'entryuuid')
-
- fp = open(conf.defaults.config_file, "w+")
- conf.cfg_parser.write(fp)
- fp.close()
-
- return
-
# Pre-execution checks
for path, directories, files in os.walk('/etc/dirsrv/'):
for direct in directories:
@@ -183,7 +150,19 @@ def execute(*args, **kw):
# TODO: Verify the user and group exist.
- _input = request_kolab_domain(_input)
+ # TODO: This takes the system fqdn, domainname and hostname, rather then
+ # the desired fqdn, domainname and hostname.
+ #
+ # TODO^2: This should be confirmed.
+
+ if conf.fqdn:
+ _input['fqdn'] = conf.fqdn
+ _input['hostname'] = conf.fqdn.split('.')[0]
+ _input['domain'] = '.'.join(conf.fqdn.split('.')[1:])
+ else:
+ _input['fqdn'] = fqdn
+ _input['hostname'] = hostname.split('.')[0]
+ _input['domain'] = domainname
_input['nodotdomain'] = _input['domain'].replace('.','_')
@@ -629,20 +608,3 @@ ServerAdminPwd = %(admin_pass)s
else:
log.error(_("Could not start and configure to start on boot, the " + \
"directory server admin service."))
-
-def request_kolab_domain(_input):
- # TODO: This takes the system fqdn, domainname and hostname, rather then
- # the desired fqdn, domainname and hostname.
- #
- # TODO^2: This should be confirmed.
-
- if conf.fqdn:
- _input['fqdn'] = conf.fqdn
- _input['hostname'] = conf.fqdn.split('.')[0]
- _input['domain'] = '.'.join(conf.fqdn.split('.')[1:])
- else:
- _input['fqdn'] = fqdn
- _input['hostname'] = hostname.split('.')[0]
- _input['domain'] = domainname
-
-