Changeset 706 for trunk/packages


Ignore:
Timestamp:
Jul 22, 2008, 1:16:12 AM (16 years ago)
Author:
price
Message:

on console, get Kerberos realm from config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-console-server/files/usr/sbin/sipb-xen-update-conserver

    r672 r706  
    2121if __name__ == '__main__':
    2222    hostname = socket.getfqdn().lower()
     23    realm = file('/etc/invirt/realm').read().strip()
     24    principal = 'host/'+hostname+'@'+realm
    2325    config = '\n'.join('console %s { master %s; }' % (vm, hostname)
    2426                       for vm in live_vms())
     
    2830    reload_conserver()
    2931    subprocess.call(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab',
    30                      'host/'+hostname+'@ATHENA.MIT.EDU'])
     32                     principal])
    3133    subprocess.call(['/usr/bin/remctl', 'sipb-xen-console.mit.edu',
    3234                     'console', 'update', config])
Note: See TracChangeset for help on using the changeset viewer.