Perry N. Myers
2008-Mar-27 14:44 UTC
[Ovirt-devel] [PATCH] fix modification of ovirt-wui.conf
ovirt-wui.conf modification in the create-default-principals script was not occurring because of an errant if statement. This has been removed. In addition, the file that comes in the RPM already has the virtual host and namevirtual host directives, so these do not need to be in the script. The modification of the Krb5KeyTab can also be removed since the default value in the rpm file is correct. Signed-off-by: Perry Myers <pmyers at redhat.com> diff --git a/wui-appliance/common-post.ks b/wui-appliance/common-post.ks index 3185cc6..de92f4b 100644 --- a/wui-appliance/common-post.ks +++ b/wui-appliance/common-post.ks @@ -83,20 +83,15 @@ if string.find(file(ipaconfname, 'rb').read(), '<VirtualHost *:8089>') < 0: print >>ipaconf2, "</VirtualHost>" ipaconf2.close() -if string.find(file(ovirtconfname, 'rb').read(), '<VirtualHost *:80>') < 0: - ovirtconf = open(ovirtconfname, 'r') - ovirttext = ovirtconf.readlines() - ovirtconf.close() - - ovirtconf2 = open(ovirtconfname, 'w') - print >>ovirtconf2, "NameVirtualHost *:80" - print >>ovirtconf2, "<VirtualHost *:80>" - for line in ovirttext: - newline = re.sub(r'(.*)KrbAuthRealms.*', r'\1KrbAuthRealms ' + default_realm, line) - newline = re.sub(r'(.*)Krb5KeyTab.*', r'\1Krb5KeyTab /etc/httpd/conf/ipa.keytab', newline) - ovirtconf2.write(newline) - print >>ovirtconf2, "</VirtualHost>" - ovirtconf2.close() +ovirtconf = open(ovirtconfname, 'r') +ovirttext = ovirtconf.readlines() +ovirtconf.close() + +ovirtconf2 = open(ovirtconfname, 'w') +for line in ovirttext: + newline = re.sub(r'(.*)KrbAuthRealms.*', r'\1KrbAuthRealms ' + default_realm, line) + ovirtconf2.write(newline) +ovirtconf2.close() EOF chmod +x /root/create_default_principals.py
Chris Lalancette
2008-Mar-27 15:03 UTC
[Ovirt-devel] [PATCH] fix modification of ovirt-wui.conf
Perry N. Myers wrote:> ovirt-wui.conf modification in the create-default-principals script was > not occurring because of an errant if statement. This has been removed. > In addition, the file that comes in the RPM already has the virtual host > and namevirtual host directives, so these do not need to be in the script. > The modification of the Krb5KeyTab can also be removed since the > default value in the rpm file is correct. > > Signed-off-by: Perry Myers <pmyers at redhat.com>Yes, this was the result of me doing two different things at two different times. This change should be fine. ACK Chris Lalancette