summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-06-23 02:06:49 -0400
committerRob Crittenden <rcritten@redhat.com>2011-06-23 02:11:34 -0400
commit8810758c11df8afb5fb7ddf97a71c55a431edfd2 (patch)
tree15065108a07fcd2d22527691b268b61a66b33fee /install
parent975e2bfa2b48c60bba99e2f2e4f106e031230bd3 (diff)
downloadfreeipa-8810758c11df8afb5fb7ddf97a71c55a431edfd2.tar.gz
freeipa-8810758c11df8afb5fb7ddf97a71c55a431edfd2.tar.xz
freeipa-8810758c11df8afb5fb7ddf97a71c55a431edfd2.zip
Let the framework be able to override the hostname.
The hostname is passed in during the server installation. We should use this hostname for the resulting server as well. It was being discarded and we always used the system hostname value. Important changes: - configure ipa_hostname in sssd on masters - set PKI_HOSTNAME so the hostname is passed to dogtag installer - set the hostname when doing ldapi binds This also reorders some things in the dogtag installer to eliminate an unnecessary restart. We were restarting the service twice in a row with very little time in between and this could result in a slew of reported errors, though the server installed ok. ticket 1052
Diffstat (limited to 'install')
-rwxr-xr-xinstall/tools/ipa-replica-install1
-rwxr-xr-xinstall/tools/ipa-server-install3
-rwxr-xr-xinstall/tools/ipactl2
3 files changed, 4 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 16f849567..3feb2a93d 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -447,6 +447,7 @@ def main():
try:
fd = open("/etc/ipa/default.conf", "w")
fd.write("[global]\n")
+ fd.write("host=" + config.host_name + "\n")
fd.write("basedn=" + util.realm_to_suffix(config.realm_name) + "\n")
fd.write("realm=" + config.realm_name + "\n")
fd.write("domain=" + config.domain_name + "\n")
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 019dfb1aa..09cc8a099 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -680,6 +680,7 @@ def main():
try:
fd = open("/etc/ipa/default.conf", "w")
fd.write("[global]\n")
+ fd.write("host=" + host_name + "\n")
fd.write("basedn=" + util.realm_to_suffix(realm_name) + "\n")
fd.write("realm=" + realm_name + "\n")
fd.write("domain=" + domain_name + "\n")
@@ -920,7 +921,7 @@ def main():
# Call client install script
try:
- run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", domain_name, "--server", host_name, "--realm", realm_name])
+ run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", domain_name, "--server", host_name, "--realm", realm_name, "--hostname", host_name])
except Exception, e:
sys.exit("Configuration of client side components failed!\nipa-client-install returned: " + str(e))
diff --git a/install/tools/ipactl b/install/tools/ipactl
index 4ce26069c..01b88a549 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -71,7 +71,7 @@ def emit_err(err):
sys.stderr.write(err + '\n')
def get_config():
- base = "cn=%s,cn=masters,cn=ipa,cn=etc,%s" % (socket.gethostname(),
+ base = "cn=%s,cn=masters,cn=ipa,cn=etc,%s" % (api.env.host,
api.env.basedn)
srcfilter = '(ipaConfigString=enabledService)'
attrs = ['cn', 'ipaConfigString']