From e2439d9b66d0289407357977f4c6e97b7888a908 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 1 Aug 2008 23:43:27 -0400 Subject: [PATCH] use invirt.config in sipb-xen-console-server svn path=/trunk/packages/sipb-xen-console-server/; revision=811 --- debian/changelog | 6 ++++++ files/usr/sbin/sipb-xen-update-conserver | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cca27f5..586a866 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-console-server (2.05) unstable; urgency=low + + * use invirt.config rather than /etc/invirt/* directly + + -- Greg Price Fri, 1 Aug 2008 23:41:00 -0400 + sipb-xen-console-server (2.04) unstable; urgency=low * Get Kerberos realm from config rather than hardcoding. diff --git a/files/usr/sbin/sipb-xen-update-conserver b/files/usr/sbin/sipb-xen-update-conserver index 1fc623b..081bb1c 100755 --- a/files/usr/sbin/sipb-xen-update-conserver +++ b/files/usr/sbin/sipb-xen-update-conserver @@ -4,6 +4,7 @@ import sipb_xen_database import subprocess import os import socket +from invirt.config import structs as config sipb_xen_database.connect('postgres://sipb-xen@sipb-xen-dev.mit.edu/sipb_xen') @@ -20,7 +21,7 @@ def reload_conserver(): if __name__ == '__main__': hostname = socket.getfqdn().lower() - realm = file('/etc/invirt/realm').read().strip() + realm = config.authn[0].realm principal = 'host/'+hostname+'@'+realm config = '\n'.join('console %s { master %s; }' % (vm, hostname) for vm in live_vms()) -- 1.7.9.5