diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-04-24 16:58:40 +0200 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-04-24 16:58:40 +0200 |
commit | 537d26c497aee5856c82b711b367dff2b1e5ce1f (patch) | |
tree | 5a0300ba47814220eae90056064fed7f2d218eea | |
parent | 64661dba08874578b4fa91b86ba7ceee9f669726 (diff) | |
download | pykolab-537d26c497aee5856c82b711b367dff2b1e5ce1f.tar.gz |
Revert "Add --without-ldap and --with-openldap"
This reverts commit 64661dba08874578b4fa91b86ba7ceee9f669726.
-rw-r--r-- | pykolab/setup/setup_ldap.py | 64 |
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 - - |