Index: /trunk/packages/sipb-xen-console/debian/changelog
===================================================================
--- /trunk/packages/sipb-xen-console/debian/changelog	(revision 799)
+++ /trunk/packages/sipb-xen-console/debian/changelog	(revision 800)
@@ -1,2 +1,8 @@
+sipb-xen-console (7.6) unstable; urgency=low
+
+  * Use invirt-getconf to generate config.
+
+ -- Greg Price <price@mit.edu>  Wed, 30 Jul 2008 22:28:33 -0400
+
 sipb-xen-console (7.5) unstable; urgency=low
 
Index: /trunk/packages/sipb-xen-console/debian/sipb-xen-console.init
===================================================================
--- /trunk/packages/sipb-xen-console/debian/sipb-xen-console.init	(revision 799)
+++ /trunk/packages/sipb-xen-console/debian/sipb-xen-console.init	(revision 800)
@@ -38,9 +38,13 @@
 gen_config()
 {
-	perl -pe 's|^|#include /etc/conserver/conf.d/|' \
-	    </etc/invirt/hosts >/etc/conserver/invirt-hosts.cf
-	INVIRT_REALM="$(cat /etc/invirt/realm)"
-	perl -pe "s|^|host/|; s|\$|\@$INVIRT_REALM|" \
-	    </etc/invirt/hosts >/etc/remctl/acl/invirt-console
+        (for i in $(invirt-getconf --ls hosts); do
+		hostname=$(invirt-getconf hosts.$i.hostname)
+		echo "#include /etc/conserver/conf.d/$hostname"
+	done) >/etc/conserver/invirt-hosts.cf
+	realm=$(invirt-getconf authn.0.realm)
+        (for i in $(invirt-getconf --ls hosts); do
+		hostname=$(invirt-getconf hosts.$i.hostname)
+		echo "host/$hostname@$realm"
+	done) >/etc/remctl/acl/invirt-console
 }
 
