From c540be1b6b42026b142e3675e008298f7ff672ce Mon Sep 17 00:00:00 2001 From: Paul Weaver Date: Wed, 30 Dec 2009 15:18:56 -0500 Subject: [PATCH] Added some code to display a service message from the xvm team to the unauth page of the website. The message lives in /etc/invirt/message, which would be symlinked to afs svn path=/trunk/packages/invirt-web/; revision=2810 --- code/main.py | 8 +++++++- code/templates/unauth.mako | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/main.py b/code/main.py index dd2b591..b05906e 100755 --- a/code/main.py +++ b/code/main.py @@ -51,7 +51,13 @@ class InvirtUnauthWeb(View): @cherrypy.expose @cherrypy.tools.mako(filename="/unauth.mako") def index(self): - return {'simple': True} + if(os.path.exists("/etc/invirt/message")): + f = open('/etc/invirt/message') + message = f.read() + else:message = None + d = dict(simple = True, serviceMessage = message) + return d + class InvirtWeb(View): def __init__(self): diff --git a/code/templates/unauth.mako b/code/templates/unauth.mako index 3544e18..dc49d8f 100644 --- a/code/templates/unauth.mako +++ b/code/templates/unauth.mako @@ -13,6 +13,11 @@ own complete system on which you can start from our three-minute Debian or Ubuntu install or install the operating system of your choice. The service is free to any Athena account holder.

+%if serviceMessage: +
+

${serviceMessage}

+
+%endif

MIT users: