From: Greg Price Date: Sat, 2 Aug 2008 03:50:51 +0000 (-0400) Subject: get console-server hostname from config in sipb-xen-update-conserver X-Git-Tag: sipb-xen-console-server/2.05~2 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/commitdiff_plain/bddfbaa249b0b36a6d743c264b6604a8854ccfd0 get console-server hostname from config in sipb-xen-update-conserver svn path=/trunk/packages/sipb-xen-console-server/; revision=813 --- diff --git a/config.todo b/config.todo index 248d383..b3044a7 100644 --- a/config.todo +++ b/config.todo @@ -1,4 +1,3 @@ files/etc/conserver/conserver.cf.sipb-xen: console-proxy ip files/etc/conserver/conserver.cf.sipb-xen: master-vm name files/usr/sbin/sipb-xen-update-conserver: db uri -files/usr/sbin/sipb-xen-update-conserver: proxy hostname diff --git a/debian/changelog b/debian/changelog index 586a866..36654c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ sipb-xen-console-server (2.05) unstable; urgency=low * use invirt.config rather than /etc/invirt/* directly + * get console-server hostname from config - -- Greg Price Fri, 1 Aug 2008 23:41:00 -0400 + -- Greg Price Fri, 1 Aug 2008 23:49:26 -0400 sipb-xen-console-server (2.04) unstable; urgency=low diff --git a/files/usr/sbin/sipb-xen-update-conserver b/files/usr/sbin/sipb-xen-update-conserver index 081bb1c..b7f3bd8 100755 --- a/files/usr/sbin/sipb-xen-update-conserver +++ b/files/usr/sbin/sipb-xen-update-conserver @@ -23,13 +23,13 @@ if __name__ == '__main__': hostname = socket.getfqdn().lower() realm = config.authn[0].realm principal = 'host/'+hostname+'@'+realm - config = '\n'.join('console %s { master %s; }' % (vm, hostname) - for vm in live_vms()) + conftext = '\n'.join('console %s { master %s; }' % (vm, hostname) + for vm in live_vms()) f = open('/etc/conserver/sipb-xen-consoles.cf', 'w') - f.write(config) + f.write(conftext) f.close() reload_conserver() subprocess.call(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab', principal]) - subprocess.call(['/usr/bin/remctl', 'sipb-xen-console.mit.edu', - 'console', 'update', config]) + subprocess.call(['/usr/bin/remctl', config.console.hostname, + 'console', 'update', conftext])