generate config files using mako
[invirt/packages/invirt-console.git] / debian / sipb-xen-console.init
index 23d439d..026eb1e 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
 ### BEGIN INIT INFO
 # Provides:          sipb-xen-console
 # Required-Start:    $local_fs $remote_fs
@@ -37,11 +37,13 @@ SCRIPTNAME=/etc/init.d/$NAME
 
 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 /etc/conserver/invirt-hosts.cf \
+             /etc/remctl/acl/invirt-console \
+             /etc/issue.net.no_tkt \
+             /etc/nss-pgsql.conf \
+             ; do
+        mako-render $i.mako > $i
+    done
 }
 
 #