Index: trunk/packages/sipb-xen-console/debian/sipb-xen-console.init
===================================================================
--- trunk/packages/sipb-xen-console/debian/sipb-xen-console.init	(revision 886)
+++ trunk/packages/sipb-xen-console/debian/sipb-xen-console.init	(revision 887)
@@ -52,21 +52,5 @@
     } > /etc/remctl/acl/invirt-console
 
-    cat > /etc/nss-pgsql.conf << EOF
-host		= $(invirt-getconf db.host)
-port		= $(invirt-getconf db.port)
-database	= $(invirt-getconf db.dbname)
-login		= $(invirt-getconf db.user)
-
-querypasswd = SELECT name, NULL, machine_id + 1000 as uid, machine_id + 1000 as gid, '', '/consolefs/'|| name, '/usr/bin/sipb-xen-consolesh' FROM machines
-querygroup = SELECT name, NULL, machine_id + 1000 as gid FROM machines
-querymembers = SELECT name FROM machines WHERE 1000 + machine_id = %d
-queryids = SELECT 1000 + machine_id AS gid FROM machines LIMIT 0
-
-passwd_name = name
-passwd_uid = 1000 + machine_id
-
-group_name = name
-group_gid = 1000 + machine_id
-EOF
+    mako-render /etc/nss-pgsql.conf.mako > /etc/nss-pgsql.conf
 
     fmt > /etc/issue.net.no_tkt << EOF
Index: trunk/packages/sipb-xen-console/files/etc/nss-pgsql.conf.mako
===================================================================
--- trunk/packages/sipb-xen-console/files/etc/nss-pgsql.conf.mako	(revision 887)
+++ trunk/packages/sipb-xen-console/files/etc/nss-pgsql.conf.mako	(revision 887)
@@ -0,0 +1,16 @@
+<% from invirt.config import structs as cfg %>
+host        = ${cfg.db.host}
+port        = ${cfg.db.port}
+database    = ${cfg.db.dbname}
+login       = ${cfg.db.user}
+
+querypasswd = SELECT name, NULL, machine_id + 1000 as uid, machine_id + 1000 as gid, '', '/consolefs/'|| name, '/usr/bin/sipb-xen-consolesh' FROM machines
+querygroup = SELECT name, NULL, machine_id + 1000 as gid FROM machines
+querymembers = SELECT name FROM machines WHERE 1000 + machine_id = %d
+queryids = SELECT 1000 + machine_id AS gid FROM machines LIMIT 0
+
+passwd_name = name
+passwd_uid = 1000 + machine_id
+
+group_name = name
+group_gid = 1000 + machine_id
