mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Server Upgrade: remove unused code in upgrade
https://fedorahosted.org/freeipa/ticket/4904 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
13c4631813
commit
b4ca5c57d2
@ -119,12 +119,10 @@ class LDAPUpdater_Upgrade(LDAPUpdater):
|
|||||||
super(LDAPUpdater_Upgrade, self).run()
|
super(LDAPUpdater_Upgrade, self).run()
|
||||||
options = self.options
|
options = self.options
|
||||||
|
|
||||||
updates = None
|
|
||||||
realm = krbV.default_context().default_realm
|
realm = krbV.default_context().default_realm
|
||||||
upgrade = IPAUpgrade(realm, self.files,
|
upgrade = IPAUpgrade(realm, self.files,
|
||||||
schema_files=options.schema_files)
|
schema_files=options.schema_files)
|
||||||
upgrade.create_instance()
|
upgrade.create_instance()
|
||||||
upgradefailed = upgrade.upgradefailed
|
|
||||||
|
|
||||||
if upgrade.badsyntax:
|
if upgrade.badsyntax:
|
||||||
raise admintool.ScriptError(
|
raise admintool.ScriptError(
|
||||||
|
@ -185,16 +185,11 @@ class LDAPUpdate:
|
|||||||
fqdn = installutils.get_fqdn()
|
fqdn = installutils.get_fqdn()
|
||||||
if fqdn is None:
|
if fqdn is None:
|
||||||
raise RuntimeError("Unable to determine hostname")
|
raise RuntimeError("Unable to determine hostname")
|
||||||
fqhn = fqdn # Save this for the sub_dict variable
|
|
||||||
if self.ldapi:
|
|
||||||
fqdn = "ldapi://%%2fvar%%2frun%%2fslapd-%s.socket" % "-".join(
|
|
||||||
self.realm.split(".")
|
|
||||||
)
|
|
||||||
|
|
||||||
if not self.sub_dict.get("REALM") and self.realm is not None:
|
if not self.sub_dict.get("REALM") and self.realm is not None:
|
||||||
self.sub_dict["REALM"] = self.realm
|
self.sub_dict["REALM"] = self.realm
|
||||||
if not self.sub_dict.get("FQDN"):
|
if not self.sub_dict.get("FQDN"):
|
||||||
self.sub_dict["FQDN"] = fqhn
|
self.sub_dict["FQDN"] = fqdn
|
||||||
if not self.sub_dict.get("DOMAIN"):
|
if not self.sub_dict.get("DOMAIN"):
|
||||||
self.sub_dict["DOMAIN"] = domain
|
self.sub_dict["DOMAIN"] = domain
|
||||||
if not self.sub_dict.get("SUFFIX") and suffix is not None:
|
if not self.sub_dict.get("SUFFIX") and suffix is not None:
|
||||||
@ -279,7 +274,6 @@ class LDAPUpdate:
|
|||||||
for each DN in the file."""
|
for each DN in the file."""
|
||||||
update = {}
|
update = {}
|
||||||
logical_line = ""
|
logical_line = ""
|
||||||
action = ""
|
|
||||||
dn = None
|
dn = None
|
||||||
lcount = 0
|
lcount = 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user