[X2Go-Commits] [live-build-x2go] 47/160: yet another attempt at getting logging to work

git-admin at x2go.org git-admin at x2go.org
Sat Nov 18 01:55:38 CET 2017


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

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

commit 4877a174306d5ebfdb6350b63e0212953c28223b
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Sun Jul 23 21:34:44 2017 +0200

    yet another attempt at getting logging to work
---
 config/includes.chroot/lib/live/config/2050-settime          | 11 +++--------
 config/includes.chroot/lib/live/config/2100-showifconfig     |  7 +------
 .../lib/live/config/2250-getsshpubkeysfromserver             | 11 +++--------
 .../lib/live/config/2300-xserver-xorg-getxorgconf            | 11 +++--------
 config/includes.chroot/lib/live/config/2400-live-autoupdate  |  2 +-
 config/includes.chroot/lib/live/config/2600-tcpprint         | 12 ++++++------
 config/includes.chroot/lib/live/config/2700-x2go-getsessions | 11 +++--------
 7 files changed, 20 insertions(+), 45 deletions(-)

diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2050-settime
index d429469..b5c17e3 100755
--- a/config/includes.chroot/lib/live/config/2050-settime
+++ b/config/includes.chroot/lib/live/config/2050-settime
@@ -11,19 +11,14 @@ cat >/etc/network/if-up.d/0050-settime <<SETTIME
 #!/bin/bash
 export TERM=linux;
 
-while ! [ -s /var/run/availablevt ] ; do
-	echo -en "\n'\$0' is waiting for a free console."
-	sleep 2
-done
-
 while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty8
 	sleep 2
 done
 if ntpdate-debian -s && hwclock --systohc ; then
-	echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty8
 else
-	echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8
 fi
 SETTIME
 
diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig
index eda2123..81a1276 100755
--- a/config/includes.chroot/lib/live/config/2100-showifconfig
+++ b/config/includes.chroot/lib/live/config/2100-showifconfig
@@ -14,13 +14,8 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS
 #!/bin/bash
 export TERM=linux;
 
-while ! [ -s /var/run/availablevt ] ; do
-	echo -en "\n'\$0' is waiting for a free console."
-	sleep 2
-done
-
 while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8
 	sleep 2
 done
 
diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver
index 8aedf12..d96284d 100755
--- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver
+++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver
@@ -17,13 +17,8 @@ GetSSHPubKeysFromServer ()
 #!/bin/bash
 export TERM=linux;
 
-while ! [ -s /var/run/availablevt ] ; do
-	echo -en "\n'\$0' is waiting for a free console."
-	sleep 2
-done
-
 while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8
 	sleep 2
 done
 
@@ -39,13 +34,13 @@ if echo "$PUBKEYURL" | grep -q "^tftp://" ; then
 	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 -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+			echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty8
 			sleep 5
 		done
 	fi
 else
 	while ! wget -q -O - $PUBKEYURL >/root/.ssh/authorized_keys ; do
-		echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+		echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty8
 		sleep 5
 	done
 fi
diff --git a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf
index 9aea82c..3996e85 100755
--- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf
+++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf
@@ -15,13 +15,8 @@ echo -n " xserver-xorg-getxorgconf"
 #!/bin/bash
 export TERM=linux;
 
-while ! [ -s /var/run/availablevt ] ; do
-	echo -en "\n'\$0' is waiting for a free console."
-	sleep 2
-done
-
 while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8
 	sleep 2
 done
 if echo "$XORGCONFURL" | grep -q "^tftp://" ; then
@@ -29,13 +24,13 @@ if echo "$XORGCONFURL" | grep -q "^tftp://" ; then
 	XORGCONFPATH=$(echo "$XORGCONFURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
 	if [ -n "\$XORGCONFSERVER" ] && [ -n "\$XORGCONFPATH" ] ; then
 		while ! atftp \$XORGCONFSERVER -g -r \$XORGCONFPATH -l $XORGCONFDESTINATION ; do
-			echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+			echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty8
 			sleep 5
 		done
 	fi
 else
 	while ! wget -q -O $XORGCONFDESTINATION $XORGCONFURL ; do
-		echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+		echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty8
 		sleep 5 
 	done
 fi
diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate
index badcc7a..9f3bdfa 100755
--- a/config/includes.chroot/lib/live/config/2400-live-autoupdate
+++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate
@@ -36,7 +36,7 @@ echo -n " live-autoupdater (backgrounding update task)"
 
 # redirect all output to first available VT console
 #
-exec >/dev/tty$(cat /var/run/availablevt) 2>&1
+exec >/dev/tty8 2>&1
 
 
 # clear console
diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint
index a0a571c..d5005ae 100755
--- a/config/includes.chroot/lib/live/config/2600-tcpprint
+++ b/config/includes.chroot/lib/live/config/2600-tcpprint
@@ -34,7 +34,7 @@ if grep -q "\W*tcpprint\W*" /proc/cmdline ; then
 	[ -d /dev/usb ] && PRINTERDEVICES=$(find /dev/usb -type c -name "lp*" | sort)
 	PRINTERDEVICES="$PRINTERDEVICES $(find /dev/ -maxdepth 1 -type c -name "lp*" | sort)"
 
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8
 
 	# Create a listening port for a TCP/9100-RAW-printer
 	#
@@ -58,21 +58,21 @@ service jetdirect${PRINTERCOUNT}
 	$TCPPRINTONLYFROM
 }
 JETDIRCONF
-		echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(cat /var/run/availablevt)
+		echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty8
 		PRINTERCOUNT=$((PRINTERCOUNT+1))
 	done
 
 	echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect
 
 	if ps -C xinetd --no-header >/dev/null ; then
-		echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+		echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty8
 		if /etc/init.d/xinetd restart; then
-			echo -n " success. All done." | tee -a /dev/tty\$(cat /var/run/availablevt)
+			echo -n " success. All done." | tee -a /dev/tty8
 		else
-			echo -n " error." | tee -a /dev/tty\$(cat /var/run/availablevt)
+			echo -n " error." | tee -a /dev/tty8
 		fi
 	else
-		echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(cat /var/run/availablevt)
+		echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty8
 	fi
 
 	) &
diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions
index 1c9ad7c..2ee6792 100755
--- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions
+++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions
@@ -18,13 +18,8 @@ X2GoGetSessions ()
 #!/bin/bash
 export TERM=linux;
 
-while ! [ -s /var/run/availablevt ] ; do
-	echo -en "\n'\$0' is waiting for a free console."
-	sleep 2
-done
-
 while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
+	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8
 	sleep 2
 done
 if echo "$SESSIONSURL" | grep -q "^tftp://" ; then
@@ -32,13 +27,13 @@ if echo "$SESSIONSURL" | grep -q "^tftp://" ; then
 	SESSIONSPATH=$(echo "$SESSIONSURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
 	if [ -n "\$SESSIONSSERVER" ] && [ -n "\$SESSIONSPATH" ] ; then
 		while ! atftp \$SESSIONSSERVER -g -r \$SESSIONSPATH -l $SESSIONSDESTINATION ; do
-			echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+			echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty8
 			sleep 5
 		done
 	fi
 else
 	while ! wget -q -O $SESSIONSDESTINATION $SESSIONSURL ; do
-		echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
+		echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty8
 		sleep 5 
 	done
 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