From 02e5a6599bf6c39b05b4b5ea8859f35942ce2347 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 13 Nov 2007 17:51:29 -0500 Subject: Forgot to include FQDN in the substitition list --- ipa-server/ipaserver/httpinstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipa-server/ipaserver/httpinstance.py') diff --git a/ipa-server/ipaserver/httpinstance.py b/ipa-server/ipaserver/httpinstance.py index 0433025b..b505d73a 100644 --- a/ipa-server/ipaserver/httpinstance.py +++ b/ipa-server/ipaserver/httpinstance.py @@ -56,7 +56,7 @@ class HTTPInstance(service.Service): service.Service.__init__(self, "httpd") def create_instance(self, realm, fqdn): - self.sub_dict = { "REALM" : realm } + self.sub_dict = { "REALM" : realm, "FQDN": fqdn } self.fqdn = fqdn self.realm = realm -- cgit From 949b4a0bf7ed8ce466617b9623e833cd26a46c13 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 15 Nov 2007 11:09:17 -0500 Subject: Check for existance of of the target file in update_file. It used to silently fail if the file it was to update didn't exist. --- ipa-server/ipaserver/httpinstance.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ipa-server/ipaserver/httpinstance.py') diff --git a/ipa-server/ipaserver/httpinstance.py b/ipa-server/ipaserver/httpinstance.py index b505d73a..60d33eed 100644 --- a/ipa-server/ipaserver/httpinstance.py +++ b/ipa-server/ipaserver/httpinstance.py @@ -50,6 +50,10 @@ def update_file(filename, orig, subst): else: sys.stdout.write(p.sub(subst, line)) fileinput.close() + return 0 + else: + print "File %s doesn't exist." % filename + return 1 class HTTPInstance(service.Service): def __init__(self): @@ -137,4 +141,5 @@ class HTTPInstance(service.Service): def __set_mod_nss_port(self): self.step("Setting mod_nss port to 443") - update_file(NSS_CONF, '8443', '443') + if update_file(NSS_CONF, '8443', '443') != 0: + print "Updating %s failed." % NSS_CONF -- cgit