on console, get Kerberos realm from config
authorGreg Price <price@mit.edu>
Tue, 22 Jul 2008 05:16:12 +0000 (01:16 -0400)
committerGreg Price <price@mit.edu>
Tue, 22 Jul 2008 05:16:12 +0000 (01:16 -0400)
svn path=/trunk/packages/sipb-xen-console-server/; revision=706

files/usr/sbin/sipb-xen-update-conserver

index 1d3580b..1fc623b 100755 (executable)
@@ -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])