[X2Go-Commits] [telekinesis] 01/02: fix syntax error, harden string handling

git-admin at x2go.org git-admin at x2go.org
Wed Oct 1 10:09:54 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository telekinesis.

commit 237f7c1a85802266d0fa37054f034423f6fa0c3c
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Oct 1 10:08:31 2014 +0200

    fix syntax error, harden string handling
---
 .../pre-suspend.d/100_telekinesis-server-suspend   |    6 +++---
 .../100_telekinesis-server-terminate               |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/lib/x2go/extensions/pre-suspend.d/100_telekinesis-server-suspend b/server/lib/x2go/extensions/pre-suspend.d/100_telekinesis-server-suspend
index 8ba7ad7..799695f 100755
--- a/server/lib/x2go/extensions/pre-suspend.d/100_telekinesis-server-suspend
+++ b/server/lib/x2go/extensions/pre-suspend.d/100_telekinesis-server-suspend
@@ -21,8 +21,8 @@
 
 export X2GO_SESSION=$1
 
-X2GO_SESSIONINFO=$(x2golistsessions | grep $X2GO_SESSION)
-TEKICTRL_PORT=$(echo $X2GO_SESSIONINFO | cut -d "|" -f15 | sed -e "s/[^0-9\-]//g")
+X2GO_SESSIONINFO="$(x2golistsessions | grep $X2GO_SESSION)"
+TEKICTRL_PORT="$(echo $X2GO_SESSIONINFO | cut -d '|' -f15 | sed -e 's/[^0-9\-]//g')"
 TEKIDATA_LOCK="$HOME/.x2go/C-${X2GO_SESSION}/telekinesis-sftp.pid"
 
 # if Telekinesis server is in use for this session, try to resume it
@@ -30,7 +30,7 @@ if [ -n "$TEKICTRL_PORT" ] && [ "x$TEKICTRL_PORT" != "x-1" ]; then
 	tekicmd -setSESSIONSUSPEND=1  -setX2GOSID=${X2GO_SESSION}
 	(if [ -f "$TEKIDATA_LOCK" ]; then
 		sleep 20
-		kill -9 $(cat "$TEKIDATA_LOCK" | sed -s 's/[^0-9]*//g');)
+		kill -9 $(cat "$TEKIDATA_LOCK" | sed -s 's/[^0-9]*//g');
 	fi;) &
 fi
 
diff --git a/server/lib/x2go/extensions/pre-terminate.d/100_telekinesis-server-terminate b/server/lib/x2go/extensions/pre-terminate.d/100_telekinesis-server-terminate
index 8ba7ad7..799695f 100755
--- a/server/lib/x2go/extensions/pre-terminate.d/100_telekinesis-server-terminate
+++ b/server/lib/x2go/extensions/pre-terminate.d/100_telekinesis-server-terminate
@@ -21,8 +21,8 @@
 
 export X2GO_SESSION=$1
 
-X2GO_SESSIONINFO=$(x2golistsessions | grep $X2GO_SESSION)
-TEKICTRL_PORT=$(echo $X2GO_SESSIONINFO | cut -d "|" -f15 | sed -e "s/[^0-9\-]//g")
+X2GO_SESSIONINFO="$(x2golistsessions | grep $X2GO_SESSION)"
+TEKICTRL_PORT="$(echo $X2GO_SESSIONINFO | cut -d '|' -f15 | sed -e 's/[^0-9\-]//g')"
 TEKIDATA_LOCK="$HOME/.x2go/C-${X2GO_SESSION}/telekinesis-sftp.pid"
 
 # if Telekinesis server is in use for this session, try to resume it
@@ -30,7 +30,7 @@ if [ -n "$TEKICTRL_PORT" ] && [ "x$TEKICTRL_PORT" != "x-1" ]; then
 	tekicmd -setSESSIONSUSPEND=1  -setX2GOSID=${X2GO_SESSION}
 	(if [ -f "$TEKIDATA_LOCK" ]; then
 		sleep 20
-		kill -9 $(cat "$TEKIDATA_LOCK" | sed -s 's/[^0-9]*//g');)
+		kill -9 $(cat "$TEKIDATA_LOCK" | sed -s 's/[^0-9]*//g');
 	fi;) &
 fi
 

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/telekinesis.git


More information about the x2go-commits mailing list