[X2Go-Commits] x2gobroker.git - statusflag (branch) updated: 5795a37779edcbb7017755544152d3f4c1809f2d

X2Go dev team git-admin at x2go.org
Tue Jun 4 21:09:27 CEST 2013


The branch, statusflag has been updated
       via  5795a37779edcbb7017755544152d3f4c1809f2d (commit)
      from  d84d3a9f90b808da5730048100abf8a34e3787aa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/x2gobroker-daemon.default |    6 ++++++
 debian/x2gobroker-daemon.init    |    5 +++++
 sbin/x2gobroker                  |    2 +-
 x2gobroker/defaults.py           |   13 ++++++++++++-
 x2gobroker/web/html.py           |    6 +++++-
 x2gobroker/web/plain.py          |    5 ++++-
 6 files changed, 33 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/debian/x2gobroker-daemon.default b/debian/x2gobroker-daemon.default
index 084897b..1e542e5 100644
--- a/debian/x2gobroker-daemon.default
+++ b/debian/x2gobroker-daemon.default
@@ -5,3 +5,9 @@ START_DAEMON=true
 
 # bind standalone daemon to this address:port
 #DAEMON_BIND_ADDRESS=127.0.0.1:8080
+
+# default X2Go Session Broker backend
+#X2GOBROKER_DEFAULT_BACKEND=zeroconf
+
+# path to the X2Go Session Broker's agent command
+#X2GOBROKER_AGENT_CMD=/usr/lib/x2go/x2gobroker-agent
diff --git a/debian/x2gobroker-daemon.init b/debian/x2gobroker-daemon.init
index 8a59922..0b0fae4 100644
--- a/debian/x2gobroker-daemon.init
+++ b/debian/x2gobroker-daemon.init
@@ -27,8 +27,13 @@ test -x "$DAEMON" || exit 0
 
 START_DAEMON=false
 DAEMON_BIND_ADDRESS=127.0.0.1:8080
+X2GOBROKER_DEFAULT_BACKEND="zeroconf"
+X2GOBROKER_AGENT_CMD="/usr/lib/x2go/x2gobroker-agent"
 test -f $DEBIANCONFIG && . $DEBIANCONFIG
 
+export X2GOBROKER_DEFAULT_BACKEND
+export X2GOBROKER_AGENT_CMD
+
 . /lib/lsb/init-functions
 
 is_true()
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index b64fd13..02287fc 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -62,7 +62,7 @@ if __name__ == "__main__":
 # import classes serving the different web.py URLs
 from x2gobroker.web.plain import *
 #from x2gobroker.web.json import *
-#from x2gobroker.web.html import *
+from x2gobroker.web.html import *
 
 # define the web.py URLs
 urls = ( '/plain/(.*)', 'X2GoBrokerWebPlain',
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index 017021c..0d3333c 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -27,7 +27,18 @@ import uuid
 X2GOBROKER_HOME = os.path.normpath(os.path.expanduser('~'))
 
 # FIXME: this path must not be hard-coded
-X2GOBROKER_AGENT_CMD="/usr/lib/x2go/x2gobroker-agent"
+if os.environ.has_key('X2GOBROKER_AGENT_CMD'):
+    X2GOBROKER_AGENT_CMD=os.environ['X2GOBROKER_AGENT_CMD']
+else:
+    X2GOBROKER_AGENT_CMD="/usr/lib/x2go/x2gobroker-agent"
+
+if os.environ.has_key('X2GOBROKER_DEFAULT_BACKEND'):
+    X2GOBROKER_DEFAULT_BACKEND=os.environ['X2GOBROKER_DEFAULT_BACKEND']
+else:
+    X2GOBROKER_DEFAULT_BACKEND="zeroconf"
+
+print X2GOBROKER_DEFAULT_BACKEND
+print X2GOBROKER_AGENT_CMD
 
 # defaults for X2Go Sessino Broker configuration file
 X2GOBROKER_CONFIG_DEFAULTS = {
diff --git a/x2gobroker/web/html.py b/x2gobroker/web/html.py
index 429c4f8..fa2f294 100644
--- a/x2gobroker/web/html.py
+++ b/x2gobroker/web/html.py
@@ -23,6 +23,9 @@
 # modules
 import web
 
+# Python X2Go Broker modules
+from x2gobroker.defaults import X2GOBROKER_DEFAULT_BACKEND as _X2GOBROKER_DEFAULT_BACKEND
+
 class X2GoBrokerWebHtml:
 
     http_header_items = {
@@ -66,7 +69,7 @@ $output
     def POST(self, backend):
 
         if not backend:
-            backend = 'zeroconf'
+            backend = _X2GOBROKER_DEFAULT_BACKEND
         else:
             backend = backend.rstrip('/')
 
@@ -108,6 +111,7 @@ $output
                 ###
                 ### WORK TODO HERE!!!
                 ###
+                pass
 
             return self.page(self.html_header_items, output)
 
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index 8819e73..bed72f1 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -24,6 +24,9 @@
 import web
 import types
 
+# Python X2Go Broker modules
+from x2gobroker.defaults import X2GOBROKER_DEFAULT_BACKEND as _X2GOBROKER_DEFAULT_BACKEND
+
 class X2GoBrokerWebPlain:
 
     http_header_items = {
@@ -42,7 +45,7 @@ class X2GoBrokerWebPlain:
     def POST(self, backend):
 
         if not backend:
-            backend = 'zeroconf'
+            backend = _X2GOBROKER_DEFAULT_BACKEND
         else:
             backend = backend.rstrip('/')
 


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list