From: Greg Price Date: Tue, 22 Jul 2008 05:16:12 +0000 (-0400) Subject: on console, get Kerberos realm from config X-Git-Tag: sipb-xen-console-server/2.04~3 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/commitdiff_plain/2cc348782375d7b1437183ea4dcb506f2d4e0497 on console, get Kerberos realm from config svn path=/trunk/packages/sipb-xen-console-server/; revision=706 --- diff --git a/files/usr/sbin/sipb-xen-update-conserver b/files/usr/sbin/sipb-xen-update-conserver index 1d3580b..1fc623b 100755 --- a/files/usr/sbin/sipb-xen-update-conserver +++ b/files/usr/sbin/sipb-xen-update-conserver @@ -20,6 +20,8 @@ def reload_conserver(): if __name__ == '__main__': hostname = socket.getfqdn().lower() + realm = file('/etc/invirt/realm').read().strip() + principal = 'host/'+hostname+'@'+realm config = '\n'.join('console %s { master %s; }' % (vm, hostname) for vm in live_vms()) f = open('/etc/conserver/sipb-xen-consoles.cf', 'w') @@ -27,6 +29,6 @@ if __name__ == '__main__': f.close() reload_conserver() subprocess.call(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab', - 'host/'+hostname+'@ATHENA.MIT.EDU']) + principal]) subprocess.call(['/usr/bin/remctl', 'sipb-xen-console.mit.edu', 'console', 'update', config])