[X2go-Commits] x2goserver.git - master (branch) updated: 3.0.99-2-328-g476ccd6

X2go dev team git-admin at x2go.org
Fri Sep 30 09:11:37 CEST 2011


The branch, master has been updated
       via  476ccd664dc6541eecf5c0622a8cf8888f150bd0 (commit)
       via  1e92e3caaf6e134fec90cca2959787edeccb338a (commit)
      from  b232c13e3c724b0071e5d98ebc8aff645017c0d7 (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 -----------------------------------------------------------------
commit 476ccd664dc6541eecf5c0622a8cf8888f150bd0
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Sep 30 09:11:34 2011 +0200

    Make digits at the beginning of X2go server extension scripts a must, not a suggestion. Contributed by Morty.

commit 1e92e3caaf6e134fec90cca2959787edeccb338a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Sep 30 08:54:16 2011 +0200

    X2go server extensions have to completely quiet, diverting stdout/stderr to /dev/null.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                                   |    6 ++++++
 .../bin/x2goserver-run-extensions                  |    4 ++--
 .../man/man8/x2goserver-run-extensions.8           |   15 +++++++++------
 3 files changed, 17 insertions(+), 8 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 51bf9c8..ce61352 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -106,6 +106,12 @@ x2goserver (3.0.99.6-0~x2go1) UNRELEASED; urgency=low
   * Adapt to renaming of x2godesktopsharing scripts.
   * Provide man page for x2goserver-run-extensions that explains the new plug-in
     mechanism of x2goserver.
+  * X2go server extensions have to completely quiet, diverting stdout/stderr to
+    /dev/null.
+
+  [ Moritz Strübe ]
+  * Make digits at the beginning of X2go server extension scripts a must, not a
+    suggestion.
 
   [ Ivan Kabaivanov ]
   * Makefile fix around man page installation in x2goserver-compat package.
diff --git a/x2goserver-extensions/bin/x2goserver-run-extensions b/x2goserver-extensions/bin/x2goserver-run-extensions
index f938171..9c309d8 100755
--- a/x2goserver-extensions/bin/x2goserver-run-extensions
+++ b/x2goserver-extensions/bin/x2goserver-run-extensions
@@ -31,9 +31,9 @@ X2GO_SESSION=$1
 X2GO_MODALITY=$2
 
 # scan extensions and execute them
-ls $X2GO_LIB_PATH/extensions/$X2GO_MODALITY.d/* | sort | while read x2go_extension; do
+ls $X2GO_LIB_PATH/extensions/$X2GO_MODALITY.d/* | egrep "^[0-9]{3}_[:alnum:]+" | sort | while read x2go_extension; do
 	$X2GO_LIB_PATH/x2gosyslog "$0" "debug" "executing $x2go_extension with option $X2GO_SESSION"
-	$x2go_extension $X2GO_SESSION && {
+	$x2go_extension $X2GO_SESSION &>/dev/null && {
 		$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$x2go_extension$(basename $0) for session $X2GO_SESSION has finished sucessfully"
 	} || {
 		$X2GO_LIB_PATH/x2gosyslog "$0" "warn" "$x2go_extension$(basename $0) for session $X2GO_SESSION returned a non-zero exit code, continuing..."
diff --git a/x2goserver-extensions/man/man8/x2goserver-run-extensions.8 b/x2goserver-extensions/man/man8/x2goserver-run-extensions.8
index 1bb6b46..2a5ad19 100644
--- a/x2goserver-extensions/man/man8/x2goserver-run-extensions.8
+++ b/x2goserver-extensions/man/man8/x2goserver-run-extensions.8
@@ -66,14 +66,17 @@ The following table shows the available modalities, the calling scripts and the
                        fail-terminate    extensions/fail-terminate.d/
 
 \fIIMPORTANT:\fR When providing X2go Server extensions by this mechanism, please pretty well make sure that these extension scripts of yours that you place
-in either of the above folders do under no circumstance fail during execution.
+in either of the above folders do under no circumstance fail during execution. Return codes are ignored and failures are therefore not (yet) propagated.
 .SH EXECUTION OF EXTENSIONS
 Scripts (or binaries) that have been placed into one of the pre/post/fail modality folders (see above) are executed in alpha-numerical sorting order.
-So best practice probably is prepending extension file names with digits to make sure they get executed in the wanted order:
-
-  0010_x2goserver-statistics
-  0020_x2goserver-mail-notify
-  0021_x2goserver-monitoring
+.PP
+Extensions will only get executed if their file names start with three digits.
+This restriction is there to make sure that X2go Server extensions get executed in the correct/wanted order:
+.PP
+For example:
+  010_x2goserver-statistics
+  020_x2goserver-mail-notify
+  021_x2goserver-monitoring
   etc.pp.
 .SH RETURN VALUES
 As exitcode \fBx2goserver-run-extensions\fR always returns 0 and pretends to be permanently happy :-).


hooks/post-receive
-- 
x2goserver.git (X2go Server)

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 "x2goserver.git" (X2go Server).




More information about the x2go-commits mailing list