Some small cleanups and keystone paste-script pkg name fix for rhel.

This commit is contained in:
Joshua Harlow 2012-02-28 13:25:47 -08:00
parent 4a3416e693
commit 40b92b29ff
2 changed files with 5 additions and 8 deletions

View File

@ -92,7 +92,7 @@
"version": "2.2*", "version": "2.2*",
"removable": true "removable": true
}, },
"python-pastescript": { "python-paste-script": {
"version": "1.7*", "version": "1.7*",
"removable": true "removable": true
}, },

View File

@ -209,18 +209,15 @@ class HorizonInstaller(comp.PythonInstallComponent):
#fix the socket prefix to someplace we can use #fix the socket prefix to someplace we can use
fc = "WSGISocketPrefix %s" % (sh.joinpths(self.log_dir, "wsgi-socket")) fc = "WSGISocketPrefix %s" % (sh.joinpths(self.log_dir, "wsgi-socket"))
sh.write_file(socket_fn, fc) sh.write_file(socket_fn, fc)
#now adjust the run user and group #now adjust the run user and group (of httpd.conf)
fc = sh.load_file(httpd_fn)
lines = fc.splitlines()
new_lines = list() new_lines = list()
for line in lines: for line in sh.load_file(httpd_fn).splitlines():
if line.startswith("User "): if line.startswith("User "):
line = "User %s" % (user) line = "User %s" % (user)
if line.startswith("Group "): if line.startswith("Group "):
line = "Group %s" % (group) line = "Group %s" % (group)
new_lines.append(line) new_lines.append(line)
fc = utils.joinlinesep(*new_lines) sh.write_file(httpd_fn, utils.joinlinesep(*new_lines))
sh.write_file(httpd_fn, fc)
def post_install(self): def post_install(self):
comp.PythonInstallComponent.post_install(self) comp.PythonInstallComponent.post_install(self)
@ -248,7 +245,7 @@ class HorizonInstaller(comp.PythonInstallComponent):
mp['USER'] = user mp['USER'] = user
mp['GROUP'] = group mp['GROUP'] = group
mp['HORIZON_DIR'] = self.appdir mp['HORIZON_DIR'] = self.appdir
mp['HORIZON_PORT'] = self.cfg.get('horizon', 'port') mp['HORIZON_PORT'] = self.cfg.getdefaulted('horizon', 'port', 80)
mp['ACCESS_LOG'] = sh.joinpths(self.log_dir, "access.log") mp['ACCESS_LOG'] = sh.joinpths(self.log_dir, "access.log")
mp['ERROR_LOG'] = sh.joinpths(self.log_dir, "error.log") mp['ERROR_LOG'] = sh.joinpths(self.log_dir, "error.log")
else: else: