actually configurize acl/web in invirt-remote-server
authorGreg Price <price@mit.edu>
Fri, 24 Oct 2008 04:33:13 +0000 (00:33 -0400)
committerGreg Price <price@mit.edu>
Fri, 24 Oct 2008 04:33:13 +0000 (00:33 -0400)
svn path=/trunk/packages/invirt-remote-server/; revision=1181

debian/invirt-remote-server.init
files/etc/remctl/acl/web [deleted file]
files/etc/remctl/acl/web.mako [new file with mode: 0644]

index 0af248c..d67e5bd 100755 (executable)
@@ -35,6 +35,13 @@ SCRIPTNAME=/etc/init.d/$NAME
 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
 . /lib/lsb/init-functions
 
+gen_config()
+{
+       for i in /etc/remctl/acl/web; do
+               mako-render $i.mako > $i
+       done
+}
+
 #
 # Function that starts the daemon/service
 #
@@ -44,6 +51,7 @@ do_start()
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
+       gen_config
        modprobe fuse
        daemon --running -n $NAME && return 1
        daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
diff --git a/files/etc/remctl/acl/web b/files/etc/remctl/acl/web
deleted file mode 100644 (file)
index be17dd3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-price/root@ATHENA.MIT.EDU
-daemon/sipb-xen.mit.edu@ATHENA.MIT.EDU
diff --git a/files/etc/remctl/acl/web.mako b/files/etc/remctl/acl/web.mako
new file mode 100644 (file)
index 0000000..eb645ed
--- /dev/null
@@ -0,0 +1,2 @@
+<% from invirt.config import structs as cfg %>
+daemon/${cfg.web.hostname}@${cfg.authn.0.realm}