[X2Go-Commits] [live-build-x2go] 45/160: logging was still broken
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 fccd509fd072b1c75aa2f3ffc23aeae652bfc6db
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Sun Jul 23 19:27:26 2017 +0200
logging was still broken
---
config/includes.chroot/lib/live/config/2000-waitforvts | 2 +-
config/includes.chroot/lib/live/config/2050-settime | 11 ++++++++---
.../includes.chroot/lib/live/config/2100-showifconfig | 7 ++++++-
.../lib/live/config/2250-getsshpubkeysfromserver | 11 ++++++++---
.../lib/live/config/2300-xserver-xorg-getxorgconf | 11 ++++++++---
.../lib/live/config/2400-live-autoupdate | 2 +-
config/includes.chroot/lib/live/config/2600-tcpprint | 18 ++++++++++++------
.../lib/live/config/2700-x2go-getsessions | 11 ++++++++---
8 files changed, 52 insertions(+), 21 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts
index 69567c0..d1b10a7 100755
--- a/config/includes.chroot/lib/live/config/2000-waitforvts
+++ b/config/includes.chroot/lib/live/config/2000-waitforvts
@@ -12,7 +12,7 @@ cat >/etc/network/if-up.d/0000-waitforvts <<WAITFORVTS
export TERM=linux;
# wait until terminal is available
-while ! [ -c /dev/tty$(fgconsole -n) ] ; do
+while [ \$(fgconsole -n) -lt 7 ] || ! [ -c /dev/tty\$(fgconsole -n) ] ; do
echo -en "\n'\$0' is waiting for an unused VT to become available."
sleep 2
done
diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2050-settime
index 549e48b..d429469 100755
--- a/config/includes.chroot/lib/live/config/2050-settime
+++ b/config/includes.chroot/lib/live/config/2050-settime
@@ -11,14 +11,19 @@ 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\$(fgconsole -n)
+ echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty\$(cat /var/run/availablevt)
else
- echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty\$(fgconsole -n)
+ 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)
fi
SETTIME
diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig
index 24268ac..eda2123 100755
--- a/config/includes.chroot/lib/live/config/2100-showifconfig
+++ b/config/includes.chroot/lib/live/config/2100-showifconfig
@@ -14,8 +14,13 @@ 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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
sleep 2
done
diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver
index 21f0c31..8aedf12 100755
--- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver
+++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver
@@ -17,8 +17,13 @@ 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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
sleep 2
done
@@ -34,13 +39,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 "Waiting for SSH Public Key ..."
+ echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
sleep 5
done
fi
else
while ! wget -q -O - $PUBKEYURL >/root/.ssh/authorized_keys ; do
- echo "Waiting for SSH Public Key ..."
+ echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
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 06794b1..9aea82c 100755
--- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf
+++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf
@@ -15,8 +15,13 @@ 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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
sleep 2
done
if echo "$XORGCONFURL" | grep -q "^tftp://" ; then
@@ -24,13 +29,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 "Waiting for xorg.conf download ..."
+ echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
sleep 5
done
fi
else
while ! wget -q -O $XORGCONFDESTINATION $XORGCONFURL ; do
- echo "Waiting for xorg.conf download ..."
+ echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
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 7e88812..badcc7a 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$(fgconsole -n) 2>&1
+exec >/dev/tty$(cat /var/run/availablevt) 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 2bb453b..a0a571c 100755
--- a/config/includes.chroot/lib/live/config/2600-tcpprint
+++ b/config/includes.chroot/lib/live/config/2600-tcpprint
@@ -8,6 +8,12 @@ TcpPrint ()
echo -n " tcpprint"
if grep -q "\W*tcpprint\W*" /proc/cmdline ; then
+
+ while ! [ -s /var/run/availablevt ] ; do
+ echo -en "\n'\$0' is waiting for a free console."
+ sleep 2
+ done
+
TCPPRINTONLYFROM=$(cat /proc/cmdline | \
tr ' ' '\n' | \
awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }')
@@ -28,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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
# Create a listening port for a TCP/9100-RAW-printer
#
@@ -52,21 +58,21 @@ service jetdirect${PRINTERCOUNT}
$TCPPRINTONLYFROM
}
JETDIRCONF
- echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(cat /var/run/availablevt)
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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
if /etc/init.d/xinetd restart; then
- echo -n " success. All done." | tee -a /dev/tty\$(fgconsole -n)
+ echo -n " success. All done." | tee -a /dev/tty\$(cat /var/run/availablevt)
else
- echo -n " error." | tee -a /dev/tty\$(fgconsole -n)
+ echo -n " error." | tee -a /dev/tty\$(cat /var/run/availablevt)
fi
else
- echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(cat /var/run/availablevt)
fi
) &
diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions
index eff3073..1c9ad7c 100755
--- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions
+++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions
@@ -18,8 +18,13 @@ 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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(cat /var/run/availablevt)
sleep 2
done
if echo "$SESSIONSURL" | grep -q "^tftp://" ; then
@@ -27,13 +32,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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
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\$(fgconsole -n)
+ echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(cat /var/run/availablevt)
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