[X2Go-Commits] [live-build-x2go] 64/166: attempt to background all network-related tasks

git-admin at x2go.org git-admin at x2go.org
Mon Nov 20 02:16:48 CET 2017


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

x2go pushed a commit to branch feature/mate-minidesktop
in repository live-build-x2go.

commit 00258b0e4c94e615769602636df8341db7cdb222
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Fri Jul 21 20:54:32 2017 +0200

    attempt to background all network-related tasks
---
 .../lib/live/config/2000-showifconfig              | 32 ++++++++-------
 .../lib/live/config/2150-getsshpubkeysfromserver   | 48 +++++++++++-----------
 .../lib/live/config/2200-xserver-xorg-getxorgconf  | 47 ++++++++++-----------
 .../lib/live/config/2600-x2go-getsessions          | 47 ++++++++++-----------
 4 files changed, 90 insertions(+), 84 deletions(-)

diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig
index ee4c1f2..4c9169c 100755
--- a/config/includes.chroot/lib/live/config/2000-showifconfig
+++ b/config/includes.chroot/lib/live/config/2000-showifconfig
@@ -16,21 +16,23 @@ cat >/etc/network/if-up.d/000-showips <<SHOWIPS
 #!/bin/bash
 export TERM=linux;
 
-while [ -z "$(hostname -I)" ] ; do
-	echo "'\$0' is waiting for a client IP."
-        sleep 2
-done
-
-IPMSG=\$(LANG=C \
-/sbin/ip a | \
-/bin/grep -P --color=always "inet.*? [\. 0-9a-f:/]*? |$" | \
-GREP_COLOR="1;32" \
-/bin/grep -P --color=always "link/ether .*? |$" ); \
-IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ); 
-sed -i '/^- /d' /etc/issue; 
-sed -i '/^- /d' /etc/issue.net; 
-echo "\$IPMSG" >> /etc/issue; 
-echo "\$IPMSG" >> /etc/issue.net 
+(
+	while [ -z "$(hostname -I)" ] ; do
+		echo "'\$0' is waiting for a client IP." | tee -a /dev/tty9
+	        sleep 2
+	done
+	
+	IPMSG=\$(LANG=C \
+	/sbin/ip a | \
+	/bin/grep -P --color=always "inet.*? [\. 0-9a-f:/]*? |$" | \
+	GREP_COLOR="1;32" \
+	/bin/grep -P --color=always "link/ether .*? |$" ); \
+	IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ); 
+	sed -i '/^- /d' /etc/issue; 
+	sed -i '/^- /d' /etc/issue.net; 
+	echo "\$IPMSG" >> /etc/issue; 
+	echo "\$IPMSG" >> /etc/issue.net
+) &
 SHOWIPS
 
 chmod 755 /etc/network/if-up.d/000-showips
diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver
index e8277dc..c1f5dc4 100755
--- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver
+++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver
@@ -17,33 +17,35 @@ GetSSHPubKeysFromServer ()
 #!/bin/bash
 export TERM=linux;
 
-while [ -z "$(hostname -I)" ] ; do
-	echo "'\$0' is waiting for a client IP."
-        sleep 2
-done
-
-# Set Keyfile
-#
-mkdir -p /root/.ssh
-chmod 600 /root/.ssh
-touch /root/.ssh/authorized_keys
-chmod 600 /root/.ssh/authorized_keys
-
-if echo "$PUBKEY" | grep -q "^tftp://" ; then
-	PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
-	PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
-	if [ -n "$PUBKEYSERVER" ] && [ -n "$PUBKEYPATH" ] ; then
-		while ! atftp $PUBKEYSERVER -g -r $PUBKEYPATH -l /root/.ssh/authorized_keys ; do
+(
+	while [ -z "$(hostname -I)" ] ; do
+		echo "'\$0' is waiting for a client IP." | tee -a /dev/tty9
+		sleep 2
+	done
+
+	# Set Keyfile
+	#
+	mkdir -p /root/.ssh
+	chmod 600 /root/.ssh
+	touch /root/.ssh/authorized_keys
+	chmod 600 /root/.ssh/authorized_keys
+
+	if echo "$PUBKEY" | grep -q "^tftp://" ; then
+		PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
+		PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
+		if [ -n "$PUBKEYSERVER" ] && [ -n "$PUBKEYPATH" ] ; then
+			while ! atftp $PUBKEYSERVER -g -r $PUBKEYPATH -l /root/.ssh/authorized_keys ; do
+				echo "Waiting for SSH Public Key ..."
+				sleep 5
+			done
+		fi
+	else
+		while ! wget -q -O - $PUBKEYURL >/root/.ssh/authorized_keys ; do
 			echo "Waiting for SSH Public Key ..."
 			sleep 5
 		done
 	fi
-else
-	while ! wget -q -O - $PUBKEYURL >/root/.ssh/authorized_keys ; do
-		echo "Waiting for SSH Public Key ..."
-		sleep 5
-	done
-fi
+) &
 GETPUBKEY
 
 		chmod 755 /etc/network/if-up.d/010-getsshpubkeysfromserver
diff --git a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf
index 1ec5870..fb9f7ea 100755
--- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf
+++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf
@@ -15,30 +15,31 @@ echo -n " xserver-xorg-getxorgconf"
 #!/bin/bash
 export TERM=linux;
 
-while [ -z "$(hostname -I)" ] ; do
-	echo "'\$0' is waiting for a client IP."
-        sleep 2
-done
-if echo "$XORGCONFURL" | grep -q "^tftp://" ; then
-        XORGCONFSERVER=$(echo "$XORGCONFURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
-        XORGCONFPATH=$(echo "$XORGCONFURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
-        if [ -n "$XORGCONFSERVER" ] && [ -n "$XORGCONFPATH" ] ; then
-                while ! atftp $XORGCONFSERVER -g -r $XORGCONFPATH -l $XORGCONFDESTINATION ; do
-                        echo "Waiting for xorg.conf download ..."
-                        sleep 5
-                done
-        fi
-else
-        while ! wget -q -O $XORGCONFDESTINATION $XORGCONFURL ; do
-                echo "Waiting for xorg.conf download ..."
-                sleep 5 
-        done
-fi
-
-if [ -s $XORGCONFDESTINATION ] ; then
-        mv $XORGCONFDESTINATION /etc/X11/xorg.conf
-fi
+(
+	while [ -z "$(hostname -I)" ] ; do
+		echo "'\$0' is waiting for a client IP."
+		sleep 2
+	done
+	if echo "$XORGCONFURL" | grep -q "^tftp://" ; then
+		XORGCONFSERVER=$(echo "$XORGCONFURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
+		XORGCONFPATH=$(echo "$XORGCONFURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
+		if [ -n "$XORGCONFSERVER" ] && [ -n "$XORGCONFPATH" ] ; then
+			while ! atftp $XORGCONFSERVER -g -r $XORGCONFPATH -l $XORGCONFDESTINATION ; do
+				echo "Waiting for xorg.conf download ..."
+				sleep 5
+			done
+		fi
+	else
+		while ! wget -q -O $XORGCONFDESTINATION $XORGCONFURL ; do
+			echo "Waiting for xorg.conf download ..."
+			sleep 5 
+		done
+	fi
 
+	if [ -s $XORGCONFDESTINATION ] ; then
+		mv $XORGCONFDESTINATION /etc/X11/xorg.conf
+	fi
+) &
 GETXORG
                 chmod 755 /etc/network/if-up.d/020-getxorgconf
         fi
diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions
index 7a90aca..8163cf6 100755
--- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions
+++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions
@@ -18,30 +18,31 @@ X2GoGetSessions ()
 #!/bin/bash
 export TERM=linux;
 
-while [ -z "$(hostname -I)" ] ; do
-	echo "'\$0' is waiting for a client IP."
-        sleep 2
-done
-if echo "$SESSIONSURL" | grep -q "^tftp://" ; then
-        SESSIONSSERVER=$(echo "$SESSIONSURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
-        SESSIONSPATH=$(echo "$SESSIONSURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
-        if [ -n "$SESSIONSSERVER" ] && [ -n "$SESSIONSPATH" ] ; then
-                while ! atftp $SESSIONSSERVER -g -r $SESSIONSPATH -l $SESSIONSDESTINATION ; do
-                        echo "Waiting for session config data ..."
-                        sleep 5
-                done
-        fi
-else
-        while ! wget -q -O $SESSIONSDESTINATION $SESSIONSURL ; do
-                echo "Waiting for session config data ..."
-                sleep 5 
-        done
-fi
-
-if [ -s $SESSIONSDESTINATION ] ; then
-        mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions
-fi
+(
+	while [ -z "$(hostname -I)" ] ; do
+		echo "'\$0' is waiting for a client IP."
+		sleep 2
+	done
+	if echo "$SESSIONSURL" | grep -q "^tftp://" ; then
+		SESSIONSSERVER=$(echo "$SESSIONSURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
+		SESSIONSPATH=$(echo "$SESSIONSURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
+		if [ -n "$SESSIONSSERVER" ] && [ -n "$SESSIONSPATH" ] ; then
+			while ! atftp $SESSIONSSERVER -g -r $SESSIONSPATH -l $SESSIONSDESTINATION ; do
+				echo "Waiting for session config data ..."
+				sleep 5
+			done
+		fi
+	else
+		while ! wget -q -O $SESSIONSDESTINATION $SESSIONSURL ; do
+			echo "Waiting for session config data ..."
+			sleep 5 
+		done
+	fi
 
+	if [ -s $SESSIONSDESTINATION ] ; then
+		mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions
+	fi
+) &
 GETSESS
 		chmod 755 /etc/network/if-up.d/030-getsessions
 	fi

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


More information about the x2go-commits mailing list