+invirt-console (0.2.16) unstable; urgency=low
+
+ * invirt-console-update now doesn't depend on remctld setting REMOTE_HOST
+
+ -- Peter Iannucci <iannucci@mit.edu> Mon, 01 Jul 2013 21:22:00 -0400
+
invirt-console (0.2.15) unstable; urgency=low
* Divert /etc/conserver/console.cf in the right binary package.
import os
import subprocess
+from invirt.config import structs as config
+
def main(args):
contents = args[2]
- hostname = os.environ['REMOTE_HOST'].lower()
+ host_addr = os.environ['REMOTE_ADDR']
+ for h in config.hosts:
+ if host_addr in h.internal_ips or host_addr == h.ip:
+ hostname = h.hostname
+ break
f = file('/etc/conserver/conf.d/'+hostname, 'w')
f.write(contents)
f.close()