generate config files using mako sipb-xen-remctl-auto/1.0.20
authorYang Zhang <y_z@mit.edu>
Thu, 14 Aug 2008 19:19:04 +0000 (15:19 -0400)
committerYang Zhang <y_z@mit.edu>
Thu, 14 Aug 2008 19:19:04 +0000 (15:19 -0400)
svn path=/trunk/packages/sipb-xen-remctl-auto/; revision=891

debian/changelog
debian/sipb-xen-remctl-auto.init
files/etc/remctl/acl/remote.mako [new file with mode: 0644]

index d372ef6..bb20064 100644 (file)
@@ -1,3 +1,9 @@
+sipb-xen-remctl-auto (1.0.20) unstable; urgency=low
+
+  * generate config files using mako
+
+ -- Yang Zhang <y_z@mit.edu>  Thu, 14 Aug 2008 15:18:46 -0400
+
 sipb-xen-remctl-auto (1.0.19) unstable; urgency=low
 
   * simplify the init script a la sipb-xen-dev
index d78d948..91ab5af 100755 (executable)
@@ -15,8 +15,9 @@ PACKAGE=sipb-xen-remctl-auto
 
 gen_config()
 {
-    echo "host/$(invirt-getconf remote.hostname)@$(invirt-getconf authn.0.realm)" \
-        > /etc/remctl/acl/remote
+    for i in /etc/remctl/acl/remote
+    do mako-render $i.mako > $i
+    done
 }
 
 case "$1" in
diff --git a/files/etc/remctl/acl/remote.mako b/files/etc/remctl/acl/remote.mako
new file mode 100644 (file)
index 0000000..8a223ff
--- /dev/null
@@ -0,0 +1,2 @@
+<% from invirt.config import structs as cfg %>\
+host/${cfg.remote.hostname}@${cfg.authn[0].realm}