This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/mate-minidesktop in repository live-build-x2go. at adac244 Revert "deleted two files that are now identical in x2gothinclient-minidesktop" (seems to have been a mistake) This branch includes the following new commits: new f686662 x2go-getsessions new 6e5dc53 ipconfig new 71f0007 exec new 18d608d Position of SESSIONSDESTINATION variable was wrong, which caused it to be empty later on new f1b2e75 whitespace fix new b550b9f adds support for "nouser" - runs passwd -l on account "user", so password "live" becomes invalid new e9bdf4a this script works like x2go-getsessions - upon detecting kernel parameter xorgconfurl=..., it tries to fetch an xorg.conf from there and installs it before X starts new 943c793 added authorized_keys download support new 1889253 added autoupdate script new 5a048e5 fixed indenting in config/includes.chroot/lib/live/config/2600-x2go-getsessions Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen, new 60f2693 changed config/includes.chroot/lib/live/config/2150-setsshkey so it won't fire until the network is up - like config/includes.chroot/lib/live/config/2600-x2go-getsessions new 69c6d7e executable bit was missing new 6429729 added tcp printing feature new a24233e added patch to share session config between X2GoClient for Windows in portable mode and X2Go-TCE isohybrid residing on same USB media new 7f19246 added patch to share ssh secret keys between X2GoClient for Windows in portable mode and X2Go-TCE isohybrid residing on same USB media new 01c387f fixed whitespace detection around cmdline parameters new d5efc71 typofixes new 0bff86a make autoupdater wait until tty10 becomes available new 41cce6a fixed whitespace detection around cmdline parameters new 9e49683 changed path-/filenames etc. to X2Go/x2go-tce prefix new 2a9ae55 added support for incomplete and dash-separated ntfs uuids new ed01cc4 name change new e246b47 name change new 584b9a9 added some status messages and error checking new e8bd9c3 name change new 9568036 name change new d0e5342 name change new 896c6fe name change new c0d363e name change new 32ff344 name change new d3d26ea name change new 712e5f8 added support for updatesleep parameter new c9e3696 name change new d11d6cb name change, adapted to work with new TCE new 2f91ffd name change new c19bb21 name change new d66c8b2 name change, adapted to work with new TCE new 8e666d7 undid path change new 71b7b7c name change new e1493d0 name change new 9277628 detection of NTFSROOT when given an incomplete UUID would fail new ff36d60 fixed calculation error - lower limit for maximum sleep time must be 240, as 239 might be a valid result when calculating the minimum sleep time new 078cead -e was missing at echo, thus literal backslash n was being printed new 57f52a4 typofix new d0b205c wget output is different for ftp, changes to SIZEFACTORSTRING and DLRATE required new 44698ab changed wget output to progress bar style in all cases new c0562bd switched to heuler repo for x2gothinclient-minidesktop new 558cb5a Added packages for MATE-Minidesktop new 7d7a780 removed thinclient startup due to possible interference with minidesktop new 04f7954 added x2go repo for binary new 78cddb1 removed nodm and openbox as they probably interfere with mate new 302cf5e add setting to confine x2gothinclient to systray new 432e322 add GPL header new 3a136f7 added file to inject thinclientmode into config new c9253c1 removed packages not found in stretch new d592548 Revert "removed packages not found in stretch" new a05b7e5 more reliable way of determining that IP has been assigned new cce2ad7 more reliable way of determining that IP has been assigned new 77a8300 more reliable way of determining that IP has been assigned new e3cbf8c added output: when sleeping while waiting for an IP, print out which script is waiting. new 6b2292c make getsessions delete thinclient_sessions file if boot parameter was passed; make thinclientconfig wait for valid thinclient_sessions file unless broker mode is active new 40a67e4 added numbers to if-up.d script file names so we can enforce the sequence of execution new a1dcfb3 we need to escape $0, as it will contain the name of the script generating the if-up.d script if we don't new 00258b0 attempt to background all network-related tasks new 26ebea5 fixes missing escape -> hostname -I was never executed new b247ec4 Variable name was wrong in one place new f00b665 un-did backgrounding new 3d0d6ef changed script numbering to four-digit, beginning with 0100 new 6d12eee added timestamps to log output, fixed log output in 2200 and 2600 new 6184389 added timestamps, switched log output to | tee -a /dev/tty9 like in the other scripts new b46dffb escape sign wass missingonce again ... new 806926d improved log output new 9d3dcf1 last commit was incomplete, and included one escape too much per echo new 6cec709 and again, missing escapes new 42fbebc indentation was wrong new f7daef7 more missing escapes new 3f921db more superfluous escapes removed new 7cc852a tty9 -> tty(first unused VT) new c2c29f8 removed old commented-out code new 84672e4 switched liveupdate to tty(next-available-VT) logging and timestamped output new 48907e5 some log output was still lacking the timestamp new 5d457d2 improved ramdisk size calculation new ee8d2a4 removed wrong comment new dcea49d moved "wait until unused VT becomes available" from 2300 to 2000 new 8e93130 renamed files to make space for a new 2000- file new f473954 renamed files; delete old names from git new 5ac8256 first attempt at making all if-up scripts wait until an unused VT is available for log output new 5725a6b removed "wait for VT" block, as it is now in a separate script new 6b5b4c9 no timestamp here, as clock is most likely wrong new d77e9c0 added time setting script new 737ed3d fixed HEREDOCs new e4940ae create debug output in file new 638ffb2 logging was still broken new ae9d13e next try: backgrounding this task instead of starting it when network becomes available new 8997be3 yet another attempt at getting logging to work new a3308b2 if-up scripts should exit with a NOP when a local network device is changing to up, rather than a real network device new ca5ecc5 removed unused code new dda433e deleted script file that didn't work anyways new ad80b04 renamed settime script new 6238288 all if-up tasks are now sent into the background and told to wait until tty becomes available also, fixed indention in tcpprint new 091a2f1 removed unneccessary escapes new 83c9878 added missing escapes new 815a672 do not clear the console new ebe40a0 /bin/sh instead of /bin/bash requires the use of "echo" instead of "echo -en" new 848fdf6 wait until regular ntpdate if-up.d call has finished new f50dc5f added debug output new 274d0b2 autoupdate-patch for ramdisk mode new 36fca82 do not trigger on METHOD="none" (which is set when IFACE="--all") new d3ecdc9 typofix new d2791a3 added debug code again new e35c671 changed log output message new 2b11f9e typofix new 6caf42a path was wrong new 9027295 added resiliency in case download directory is missing, fixed imagesize calculation new a03fb94 added sleep to increase chance that ntpdate manages to connect new 978c2d5 IMGSIZEDOWNLOAD was missing a filter that limits its content to $1 (awk-style) new f927390 improved logging, added error detection for mount process new 1c2bd12 increased log output new 04155eb expanded logging, changed log messages new 55a0fb2 inserted proper umount/remount_ro -> moved into subroutine, as req'd in two places new 4bd43f6 removed a cleanup command that would umount /lib/live/mount/findiso when in ramdisk mode, which is a stupid thing to do new 552af0a when trying to find the right storage device to deploy an update to in ramdisk mode, use read-only mounts at first new 2abcdd2 using mv would accumulate clutter in $DOWNLOADPATH if any extra files are present in the source; switched to rsync --delete and rm instead new 2ec1921 only rm if rsync was successful new d7f4856 improved logging new 4bb9123 /bin/sh seems to insist on blank between { and # new 9c9fee5 improved logging new 4422ea7 only attempt umount when path is a mounted device / improved logging new fd14ca9 in ramdisk mode, storage should be umounted at the end of an (attempted) upgrade new 59a174d in /bin/sh, echo -en is not supported, but echo -n is and should thus be used new 8290dc4 mproved logging: bandwidth test should now output progress bar. new 8330bbe added version and booted system info output, indentation fixed new 799fd90 renamed file to better represent what it does new 21ee071 added steps to further reduce clutter buildup, changed/improved logging new 030ade9 make autoupdater show available versions before and after update new 1291b7d wget param change had unintended side effects - log file was empty. rsync does not need the tee helper construct. Various spelling fixes in log output. new 0f025c8 typofix new be21ee7 more typofixes new 0d7e5ef write timestamps to text file, for easier querying by checkscripts new d498d22 logfile will now also contain which environment is the running one new bac0ecc added code to check timestamp before download new 9d70846 typofix new 0e7dcb3 mountpoint detection must come earlier in the script, or MOUNTPOINT variable will be empty when it's already needed by other script parts new 9e25c41 variable name was wrong new f05af2a speed optimization, also addedoutputto /var/run/banner where ssh should pick it up new f16da78 further speed improvements, also, enable banner in sshd config if it was disabled new 5b5ebc6 looks like debian-live doesn't use /var/run/banner new 885144e we need to strip the ANSI as it doesn't work in issue.net via SSH new e30c112 test: use motd instead of issue.net new a835577 switched to motd instead of issue.net, removed motd display from pam login so it doesn't appear twice on local login new a12cafe motd and issue are now written to simultaneously; once finished, all unused VTs are reloaded to make sure they display the new /etc/issue new a8a743a changed logfile format new 952c02d make sure to match to end of line only new eb96dad timestamp is now checked before BWLIMIT is determined -> faster, less traffic new 216759b tempdir preparation only needs to take place if we need to perform an update or if checking the timestamp failed (the latter part is still missing -> next commit). Also, checking the return code didn't work as expected. Finally, some style fixes. new c5a258b tempdir preparation only needs to take place if we need to perform an update or if checking the timestamp failed. Also, indentation was wrong. new 3ab4f80 fixed a copy-paste-induced error new 3020af6 renamed files to be consistent with branch feature/openbox new e24053d nvertedsequence of timestamp and envname, fixes problem that marker for active env isn't set, also, easier on the eyes new 534bd12 booted env and build version should go to motd, too new 30a97c5 Merge changes to config/includes.chroot/lib/live/config/ from feature/openbox into feature/mate-minidesktop. new 7df4f1a commented out i386-only package (geode Xorg driver) new f6e19be deleted two files that are now identical in x2gothinclient-minidesktop new ae589ab Merge branch 'feature/openbox' into feature/mate-minidesktop new f4d888d mate-minidesktop is built from heuler, so it needs the new package name for x2go(thinclient-)usbmount. Also, all mate-minidesktop-related packages go into their own package.list file now, so x2go.list.chroot can always be merged from one of the openbox branches new adac244 Revert "deleted two files that are now identical in x2gothinclient-minidesktop" (seems to have been a mistake) The 166 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- 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
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 18d608d125b649f6ee56c24d15c4ec1f785dd3a9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jun 21 14:57:26 2016 +0200 Position of SESSIONSDESTINATION variable was wrong, which caused it to be empty later on --- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 7b15e7d..b43851a 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -11,10 +11,10 @@ echo -n " x2go-getsessions" tr ' ' '\n' | \ awk -F'=' ' /^sessionsurl=/ { print $2 }') if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then + SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new cat >/etc/network/if-up.d/getsessions <<GETSESS #!/bin/bash export TERM=linux; -SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do sleep 2 -- 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
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 6e5dc5346bb43ac14465e47847b867c21494c946 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Jun 20 16:54:50 2016 +0200 ipconfig --- .../includes.chroot/lib/live/config/2000-ipconfig | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2000-ipconfig b/config/includes.chroot/lib/live/config/2000-ipconfig new file mode 100644 index 0000000..fb108ea --- /dev/null +++ b/config/includes.chroot/lib/live/config/2000-ipconfig @@ -0,0 +1,39 @@ +#!/bin/bash + +IFConfig () +{ + +# Output startup message +# +echo -n " ifconfig" + +#setterm -term linux -r >/dev/tty9 +# Make sure no language-specific stuff interferes with our matching +# grep: highlight everything that matches "inet" to the end of its line +# and also (-E, |$) show every line that has an end => Everything else +# Output the result on virtual terminal 9 +cat >/etc/network/if-up.d/showips <<SHOWIPS +#!/bin/bash +export TERM=linux; + +while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do + 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/showips + +} + +IFConfig -- 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
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 71f000786f4894dadb7007504d8f519cf4e4bd50 Author: Juri Grabowski <git-commit@jugra.de> Date: Mon Jun 20 18:00:37 2016 +0200 exec --- config/includes.chroot/lib/live/config/2000-ipconfig | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-ipconfig b/config/includes.chroot/lib/live/config/2000-ipconfig old mode 100644 new mode 100755 -- 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
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 f6866626cd65d6aeeca351384ced159e2105b598 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Jun 20 16:51:30 2016 +0200 x2go-getsessions --- .../lib/live/config/2600-x2go-getsessions | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions new file mode 100755 index 0000000..7b15e7d --- /dev/null +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -0,0 +1,47 @@ +#!/bin/sh + +X2GoGetSessions () +{ +# Output startup message +# +echo -n " x2go-getsessions" + + + SESSIONSURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^sessionsurl=/ { print $2 }') + if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then + cat >/etc/network/if-up.d/getsessions <<GETSESS +#!/bin/bash +export TERM=linux; +SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new + +while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do + 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/getsessions + fi +} + +X2GoGetSessions -- 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
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 f1b2e7560db725e3142888ae760c82622dfc61d9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jun 21 19:00:11 2016 +0200 whitespace fix --- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 1 - 1 file changed, 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index b43851a..20006b9 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -6,7 +6,6 @@ X2GoGetSessions () # echo -n " x2go-getsessions" - SESSIONSURL=$(cat /proc/cmdline | \ tr ' ' '\n' | \ awk -F'=' ' /^sessionsurl=/ { print $2 }') -- 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
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 e9bdf4a18424978aca9af988fa6a771f15a1ffe1 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 12 18:10:30 2016 +0200 this script works like x2go-getsessions - upon detecting kernel parameter xorgconfurl=..., it tries to fetch an xorg.conf from there and installs it before X starts --- .../lib/live/config/2200-x11-getxorgconf | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2200-x11-getxorgconf b/config/includes.chroot/lib/live/config/2200-x11-getxorgconf new file mode 100755 index 0000000..d28bf04 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2200-x11-getxorgconf @@ -0,0 +1,45 @@ +#!/bin/sh + +X11GetXorgConf () +{ +# Output startup message +# +echo -n " x11-getxorgconf" + + XORGCONFURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^xorgconfurl=/ { print $2 }') + if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then + XORGCONFDESTINATION=/etc/X11/xorg.conf.new + cat >/etc/network/if-up.d/getxorgconf <<GETXORG +#!/bin/bash +export TERM=linux; + +while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do + 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/getxorgconf + fi +} +X11GetXorgConf -- 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
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 b550b9f8f4e9cd4852340347ea4322ab4a23a88d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 12 18:09:54 2016 +0200 adds support for "nouser" - runs passwd -l on account "user", so password "live" becomes invalid --- config/includes.chroot/lib/live/config/2100-lockuser | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2100-lockuser b/config/includes.chroot/lib/live/config/2100-lockuser new file mode 100755 index 0000000..7f89531 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2100-lockuser @@ -0,0 +1,20 @@ +#!/bin/sh + +LockUser () +{ + +# Output startup message +# +echo -n " lockuser" + + +# Set password +# +if grep -q " *nouser *" /proc/cmdline ; then + passwd -l user >/dev/null +fi + +} + +LockUser + -- 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
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 188925341d6cd2c12c03de9f725d30303bb5b05e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Dec 16 17:35:02 2016 +0100 added autoupdate script --- .../lib/live/config/2300-autoupdate | 394 +++++++++++++++++++++ 1 file changed, 394 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate new file mode 100755 index 0000000..324f62a --- /dev/null +++ b/config/includes.chroot/lib/live/config/2300-autoupdate @@ -0,0 +1,394 @@ +#!/bin/sh + +cleanup () +{ # discard contents of tmpfs, umount if necessary + if [ -n "$NTFSROOT" ]; then + echo "Removing '$TEMPDIR/*'." + rm -rf $TEMPDIR/* + else + echo "Unmounting '$TEMPDIR'." + umount $TEMPDIR + fi + if rmdir $TEMPDIR; then + echo "Removed empty directory '$TEMPDIR'." + else + echo "Could not remove directory '$TEMPDIR'." + fi + if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo "Unmounted '$MOUNTPOINT'." + else + echo "Could not unmount '$MOUNTPOINT'." + fi + fi +} + +AutoUpdateMain () +{ +# Output startup message +# +echo -n " autoupdater (backgrounding update task)" + + +# Background everything +# +( + + +# redirect all output to console #10 +# +exec >/dev/tty10 2>&1 + + +# clear console +# +clear + + +# This is so grep, awk and sed will match the right terms regardless of LANG +# +unset LANG +unset LC_ALL +unset LC_MESSAGES + + +# download url pointing to directory with all required files goes here +DOWNLOADURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updateurl=/ { print $2 }') + +if [ -z "$\DOWNLOADURL" ]; then + echo "No update URL. Exiting." + return 0 +fi + +# Bandwidth limit goes here +# +#BWLIMITPERCENT=20 # in percent, numeric-only +BWLIMITPERCENT=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^bwlimit=/ { print $2 }') +if [ -z "$\BWLIMITPERCENT" ]; then + BWLIMITPERCENT=20 + echo "Bandwidth limit not set. Defaulting to 20%." +fi + + + +# sleeping a random amount of time to ease load on the update server +# +SLEEPTIME=0 +echo -n "Calculating random update delay (120-900 seconds)..." +while [ $SLEEPTIME -lt 120 ]; do + echo -n "." + # During startup, script is run with /bin/sh, + # even when #!/bin/bash is set, + # so we need to improvise. + RND=$(/bin/bash -c 'echo $RANDOM') + SLEEPTIME=$((RND%900)) +done +echo " " +echo "Sleeping for $SLEEPTIME seconds ..." +sleep $SLEEPTIME + + +# Define our mountpoint and check if we're capable of auto-updating +NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') +if [ -n "$NTFSROOT" ]; then + mkdir -p /lib/live/mount/ntfsroot + mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot + MOUNTPOINT="/lib/live/mount/ntfsroot/" + # create a temporary directory + TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) +else + MOUNTPOINT="/lib/live/mount/findiso/" + # create a temporary directory and mount a tmpfs there + TEMPDIR=$(mktemp -d --tmpdir=/mnt) + IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR + +fi +if ! ( [ -d "$MOUNTPOINT/boot/live-download" ] && \ + ( \ + [ -d "$MOUNTPOINT/boot/live1" ] || \ + [ -d "$MOUNTPOINT/boot/live2" ] \ + ) \ + ); then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "No directories suitable for update." + return 0 # directories missing, most likely not a writeable medium +fi + + +# define and figure out some paths that we will be needing later on +# +if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/" +elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/syslinux/" +elif [ -f "$MOUNTPOINT/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/" +elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/grub/" +elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/boot/grub/" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "No suitable bootloader found." + return 1 +fi + +RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^findiso=/ { print $2 }')")) + +ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) +RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) +if [ "$RUNNINGSYSTEMNAME" = "live1" ]; then + OTHERSYSTEMNAME="live2" +elif [ "$RUNNINGSYSTEMNAME" = "live2" ]; then + OTHERSYSTEMNAME="live1" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Unable to determine path/name of running system." + return 1 +fi +OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") +DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/live-download/") + + +# Now we'll copy the content of the live-download folder to our tempdir +# this is so we can run wget in update mode (-N) or rsync without needing +# write access to our boot medium (write access means increased wear and tear, +# and we want to avoid that especially for media that has no wear-leveling +# like CF cards) +# +while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do + echo "Sleeping 30 seconds ..." + sleep 30 + echo "Retrying ..." +done + + +# Now let's figure out if we're supposed to use wget or rsync for downloading +# +if echo "$DOWNLOADURL" | grep -q "^http" || \ + echo "$DOWNLOADURL" | grep -q "^ftp" + then + # Attempt to determine available bandwidth & to set BWLIMIT accordingly + wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ + --progress=bar:force $DOWNLOADURL/initrd.img + cp --update "/tmp/initrd.img" "$TEMPDIR" + rm "/tmp/initrd.img" + SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ + $7 == "-" { print $5 }' /tmp/dl.log \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -n "Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "KB/s") SIZEFACTOR=1;; + "MB/s") SIZEFACTOR=1024;; + "GB/s") SIZEFACTOR=1048576;; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ + { print $4 }' /tmp/dl.log \ + ) + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo "Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --limit-rate=${BWLIMIT}k $DOWNLOADURL" + +elif echo "$DOWNLOADURL" | grep -q "^rsync"; then + + rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/initrd.img \ + $TEMPDIR/initrd.img.new + mv $TEMPDIR/initrd.img.new $TEMPDIR/initrd.img + SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $11 }' \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -n "Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "K") SIZEFACTOR=1;; + "M") SIZEFACTOR=1024;; + "G") SIZEFACTOR=$((1024*1024));; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $10 }') + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo "Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ + $TEMPDIR" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Unsupported download mechanism." + return 1 +fi +rm /tmp/dl.log + + +# Proceed to download from update location +# +while ! $DOWNLOADCOMMAND; do + echo "Sleeping 30 seconds ..." + sleep 30 + echo "Retrying ..." +done + +# Now check if these files are different from what we already have in our +# download directory on the boot medium +# +echo "Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." +if diff -q $DOWNLOADPATH $TEMPDIR \ + >/dev/null + + then + cleanup + echo "Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium +else + echo "Differences detected. Continuing ..." +fi + + +# If we made it past that point, it's time to update the boot medium, so let's +# remount it rw and async for speed +# +if mount -oremount,rw,async $MOUNTPOINT; then + echo "Remounted '$MOUNTPOINT' as rw and async." +else + echo "Could not remount '$MOUNTPOINT' as rw and async." +fi + + +# Now, we don't want to copy an index.htm(l) file, so let's do away with that +# +rm -f $TEMPDIR/index.ht* + + +# move everything over to the boot medium +# +echo "Moving $TEMPDIR/* => $DOWNLOADPATH" +mv $TEMPDIR/* $DOWNLOADPATH +cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? +if [ -n "$NTFSROOT" ]; then + echo "NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then + echo "Mount successful." + else + echo "Failed to mount NTFSROOT." + fi +fi + + +# let's check if we just downloaded a copy of our running system +# +echo "Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" +if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ + [ -d "$OTHERSYSTEMFULLPATH" ] ; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Nothing to do. Content of $DOWNLOADPATH equals" \ + "$RUNNINGSYSTEMNAME." + return 0 # current is newest, nothing to do, + # we want to keep the old system in OTHERSYSTEMFULLPATH + # as a fallback +fi + + +# make sure our destination path really exists +# +mkdir -p $OTHERSYSTEMFULLPATH + + +# let's check if our destination is already up to date or needs updating +# +echo "Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" +if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Nothing to do - content of '$DOWNLOADPATH' equals"\ + "'$OTHERSYSTEMNAME'." + return 0 # OTHERSYSTEMFULLPATH is already up to date +else + # keep rsyncing until the update is complete + echo "Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH + do + echo "Sleeping 30 seconds ..." + sleep 30 + echo "Retrying ..." + done +fi + + +# change default boot to the image we just downloaded and installed +# +if [ -n "$SYSLINUXPATH" ]; then + echo "Changing syslinux default to $OTHERSYSTEMNAME-486." + sed -i -e"/^default/cdefault $OTHERSYSTEMNAME-486" \ + $SYSLINUXPATH/syslinux.cfg + +elif [ -n "$GRUBPATH" ]; then + MENULST=$GRUBPATH/menu.lst + CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') + CURRENTTITLEPOSITION=$(grep '^title' $MENULST | grep -n "${RUNNINGSYSTEMNAME}-486" | awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}-486"'/ { print $1 }') + CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) + OTHERTITLEPOSITION=$(grep '^title' $MENULST | grep -n "${OTHERSYSTEMNAME}-486" | awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}-486"'/ { print $1 }') + OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) + if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then + echo "Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ + $MENULST + else + echo "Not changing GRUB-legacy default." + echo "Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo "while default is set to position '$CURRENTDEFAULT'." + fi +else + echo "Unsupported bootloader." +fi + +# we're on an async mount point, so let's sync to be safe +# +sync + + +# umount tempdir to free memory +# +if [ -d $TEMPDIR ]; then + cleanup +fi + + +# now, change mount back to ro and sync +# +if [ -n "$NTFSROOT" ]; then + umount $MOUNTPOINT +else + mount -oremount,ro,sync $MOUNTPOINT +fi + +) & + +} + +AutoUpdateMain + -- 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
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 943c7938644b9312d7413f71eb5252776e150e96 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Dec 16 02:31:58 2016 +0100 added authorized_keys download support --- .../includes.chroot/lib/live/config/2150-setsshkey | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2150-setsshkey b/config/includes.chroot/lib/live/config/2150-setsshkey new file mode 100755 index 0000000..45572f7 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2150-setsshkey @@ -0,0 +1,44 @@ +#!/bin/sh + +SetSSHKey () +{ + +# Output startup message +# +echo -n " setsshkey" + + +PUBKEYURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^pubkey=/ { print $2 }') + +if [ -n "$PUBKEYURL" ] ; then + + # 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 +fi + +} + +SetSSHKey + -- 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
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 a24233e7dd2194695131caea58dba89255819338 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Dec 27 18:24:59 2016 +0100 added patch to share session config between X2GoClient for Windows in portable mode and X2Go-TCE isohybrid residing on same USB media --- .../lib/live/config/2400-getportableappsettings | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2400-getportableappsettings b/config/includes.chroot/lib/live/config/2400-getportableappsettings new file mode 100755 index 0000000..b607643 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2400-getportableappsettings @@ -0,0 +1,23 @@ +#!/bin/sh + +GetPortableAppSettings () +{ + +# Output startup message +# +echo -n " getportableappsettings" + +# This script is for using the iso-hybrid image along with the "second partition" patch +# it allows you to share a configuration between X2GoClient for Windows in portable +# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions + +if [ -L /dev/disk/by-label/PORTABLEAPP ]; then + mkdir -p /media/PORTABLEAPP && \ + mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \ + ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions +else + true +fi +} + +GetPortableAppSettings -- 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
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 69c6d7e3a713d49ca9976c2377f9fa75107e843c Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 17 03:55:47 2016 +0100 executable bit was missing --- config/includes.chroot/lib/live/config/2150-setsshkey | 1 + 1 file changed, 1 insertion(+) diff --git a/config/includes.chroot/lib/live/config/2150-setsshkey b/config/includes.chroot/lib/live/config/2150-setsshkey index e5756ef..a40918d 100755 --- a/config/includes.chroot/lib/live/config/2150-setsshkey +++ b/config/includes.chroot/lib/live/config/2150-setsshkey @@ -45,6 +45,7 @@ else fi GETPUBKEY + chmod 755 /etc/network/if-up.d/getpubkey 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
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 5a048e56a1bb708a1b909dd9baa2d9b0938ef2c2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 17 01:29:29 2016 +0100 fixed indenting in config/includes.chroot/lib/live/config/2600-x2go-getsessions Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen, --- .../lib/live/config/2600-x2go-getsessions | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 20006b9..74524fc 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -2,16 +2,16 @@ X2GoGetSessions () { -# Output startup message -# -echo -n " x2go-getsessions" + # Output startup message + # + echo -n " x2go-getsessions" - SESSIONSURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^sessionsurl=/ { print $2 }') - if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then - SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new - cat >/etc/network/if-up.d/getsessions <<GETSESS + SESSIONSURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^sessionsurl=/ { print $2 }') + if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then + SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new + cat >/etc/network/if-up.d/getsessions <<GETSESS #!/bin/bash export TERM=linux; @@ -39,8 +39,8 @@ if [ -s $SESSIONSDESTINATION ] ; then fi GETSESS - chmod 755 /etc/network/if-up.d/getsessions - fi + chmod 755 /etc/network/if-up.d/getsessions + fi } X2GoGetSessions -- 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
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 60f2693881af6e36d58843344cfa4d8af5cd99ca Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 17 01:30:36 2016 +0100 changed config/includes.chroot/lib/live/config/2150-setsshkey so it won't fire until the network is up - like config/includes.chroot/lib/live/config/2600-x2go-getsessions --- .../includes.chroot/lib/live/config/2150-setsshkey | 59 +++++++++++++--------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2150-setsshkey b/config/includes.chroot/lib/live/config/2150-setsshkey index 45572f7..e5756ef 100755 --- a/config/includes.chroot/lib/live/config/2150-setsshkey +++ b/config/includes.chroot/lib/live/config/2150-setsshkey @@ -3,40 +3,49 @@ SetSSHKey () { -# Output startup message -# -echo -n " setsshkey" + # Output startup message + # + echo -n " setsshkey" -PUBKEYURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^pubkey=/ { print $2 }') + PUBKEYURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^pubkey=/ { print $2 }') -if [ -n "$PUBKEYURL" ] ; then + if [ -n "$PUBKEYURL" ] ; then + cat >/etc/network/if-up.d/getpubkey <<GETPUBKEY +#!/bin/bash +export TERM=linux; - # 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 +while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do + 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 +GETPUBKEY + + 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
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 64297293c28a8ce8faaafcb84ebd68f5d1b3ce34 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Dec 27 18:15:38 2016 +0100 added tcp printing feature --- .../includes.chroot/lib/live/config/2500-tcpprint | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint new file mode 100755 index 0000000..ded7412 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -0,0 +1,76 @@ +#!/bin/bash + +TcpPrint () +{ + +# Output startup message +# +echo -n " tcpprint" + +if grep -q " *tcpprint *" /proc/cmdline ; then + TCPPRINTONLYFROM=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }') + if [ -n "$TCPPRINTONLYFROM" ] ; then + TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM" + fi + # Backgrounding + ( + + while ! lsmod | grep -q "^lp"; do + # Wait till modprobe lp has occurred + # -> this means /dev is fully populated + # => USB-Printers can be detected now, too + sleep 30 + done + + PRINTERDEVICES="" + [ -d /dev/usb ] && PRINTERDEVICES=$(find /dev/usb -type c -name "lp*" | sort) + PRINTERDEVICES="$PRINTERDEVICES $(find /dev/ -maxdepth 1 -type c -name "lp*" | sort)" + + echo "\nSetting up local printers ..." >>/dev/tty9 + + # Create a listening port for a TCP/9100-RAW-printer + # + # printers may be at /dev/lp_ and at /dev/usb/lp_ + PRINTERCOUNT=0 + for PRINTERDEV in $PRINTERDEVICES; do + PORTNUMBER=$((PRINTERCOUNT+9100)) + echo "jetdirect${PRINTERCOUNT} ${PORTNUMBER}/tcp" >>/etc/services + cat >/etc/xinetd.d/jetdirect${PRINTERCOUNT} << JETDIRCONF +service jetdirect${PRINTERCOUNT} +{ + socket_type = stream + protocol = tcp + wait = no + user = root + server = /bin/dd + server_args = of=$PRINTERDEV bs=1024k + groups = yes + disable = no + instances = 1 + $TCPPRINTONLYFROM +} +JETDIRCONF + echo "Mapping $PRINTERDEV => $PORTNUMBER" >>/dev/tty9 + PRINTERCOUNT=$((PRINTERCOUNT+1)) + done + + echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect + + if ps -C xinetd --no-header >/dev/null ; then + echo -n "xinetd needs to be restarted, trying to do that ..." >>/dev/tty9 + if /etc/init.d/xinetd restart; then + echo -n " success. All done." >>/dev/tty9 + else + echo -n " error." >>/dev/tty9 + fi + else + echo -n "No xinetd restart necessary. All done." >>/dev/tty9 + fi + + ) & +fi +} + +TcpPrint -- 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
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 d5efc718e05fab383e96f22ba5368346d3f78a45 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 31 21:28:49 2016 +0100 typofixes --- config/includes.chroot/lib/live/config/2300-autoupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate index 324f62a..ebc2bb5 100755 --- a/config/includes.chroot/lib/live/config/2300-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-autoupdate @@ -57,7 +57,7 @@ DOWNLOADURL=$(cat /proc/cmdline | \ tr ' ' '\n' | \ awk -F'=' ' /^updateurl=/ { print $2 }') -if [ -z "$\DOWNLOADURL" ]; then +if [ -z "$DOWNLOADURL" ]; then echo "No update URL. Exiting." return 0 fi @@ -68,7 +68,7 @@ fi BWLIMITPERCENT=$(cat /proc/cmdline | \ tr ' ' '\n' | \ awk -F'=' ' /^bwlimit=/ { print $2 }') -if [ -z "$\BWLIMITPERCENT" ]; then +if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 echo "Bandwidth limit not set. Defaulting to 20%." 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
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 ed01cc482b22cb4389bb37c6f8df7dd47d3845d7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 09:31:51 2017 +0100 name change --- .../lib/live/config/2300-live-autoupdate | 412 +++++++++++++++++++++ 1 file changed, 412 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate new file mode 100755 index 0000000..520b1a3 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -0,0 +1,412 @@ +#!/bin/sh + +cleanup () +{ # discard contents of tmpfs, umount if necessary + if [ -n "$NTFSROOT" ]; then + echo "Removing '$TEMPDIR/*'." + rm -rf $TEMPDIR/* + else + echo "Unmounting '$TEMPDIR'." + umount $TEMPDIR + fi + if rmdir $TEMPDIR; then + echo "Removed empty directory '$TEMPDIR'." + else + echo "Could not remove directory '$TEMPDIR'." + fi + if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo "Unmounted '$MOUNTPOINT'." + else + echo "Could not unmount '$MOUNTPOINT'." + fi + fi +} + +LiveAutoUpdateMain () +{ +# Output startup message +# +echo -n " live-autoupdater (backgrounding update task)" + + +# Background everything +# +( + +# wait until terminal is available +while ! [ -c /dev/tty10 ] ; do + sleep 10 +done + +# redirect all output to console #10 +# +exec >/dev/tty10 2>&1 + + +# clear console +# +clear + + +# This is so grep, awk and sed will match the right terms regardless of LANG +# +unset LANG +unset LC_ALL +unset LC_MESSAGES + + +# download url pointing to directory with all required files goes here +DOWNLOADURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updateurl=/ { print $2 }') + +if [ -z "$DOWNLOADURL" ]; then + echo "No update URL. Exiting." + return 0 +fi + +# Bandwidth limit goes here +# +#BWLIMITPERCENT=20 # in percent, numeric-only +BWLIMITPERCENT=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^bwlimit=/ { print $2 }') +if [ -z "$BWLIMITPERCENT" ]; then + BWLIMITPERCENT=20 + echo "Bandwidth limit not set. Defaulting to 20%." +fi + + + +# sleeping a random amount of time to ease load on the update server +# +SLEEPTIME=0 +echo -n "Calculating random update delay (120-900 seconds)..." +while [ $SLEEPTIME -lt 120 ]; do + echo -n "." + # During startup, script is run with /bin/sh, + # even when #!/bin/bash is set, + # so we need to improvise. + RND=$(/bin/bash -c 'echo $RANDOM') + SLEEPTIME=$((RND%900)) +done +echo " " +echo "Sleeping for $SLEEPTIME seconds ..." +sleep $SLEEPTIME + + +# Define our mountpoint and check if we're capable of auto-updating +NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') +if [ -n "$NTFSROOT" ]; then + mkdir -p /lib/live/mount/ntfsroot + # This is in case we've been passed an incomplete UUID and/or one with dashes + # For example, "vol c:" on Windows will return the last 8 digits of the UUID + # only, and separate them with a dash. + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(echo $NTFSROOT | tr -d '-') + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1) + fi + fi + + mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot + MOUNTPOINT="/lib/live/mount/ntfsroot/" + # create a temporary directory + TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) +else + MOUNTPOINT="/lib/live/mount/findiso/" + # create a temporary directory and mount a tmpfs there + TEMPDIR=$(mktemp -d --tmpdir=/mnt) + IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR + +fi +if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ + ( \ + [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ + [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ + ) \ + ); then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "No directories suitable for update." + return 0 # directories missing, most likely not a writeable medium +fi + + +# define and figure out some paths that we will be needing later on +# +if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/" +elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/syslinux/" +elif [ -f "$MOUNTPOINT/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/" +elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/grub/" +elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/boot/grub/" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "No suitable bootloader found." + return 1 +fi + +RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^findiso=/ { print $2 }')")) + +ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) +RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) +if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then + OTHERSYSTEMNAME="X2Go-live2" +elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then + OTHERSYSTEMNAME="X2Go-live1" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Unable to determine path/name of running system." + return 1 +fi +OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") +DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") + + +# Now we'll copy the content of the X2Go-live-download folder to our tempdir +# this is so we can run wget in update mode (-N) or rsync without needing +# write access to our boot medium (write access means increased wear and tear, +# and we want to avoid that especially for media that has no wear-leveling +# like CF cards) +# +while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do + echo "Sleeping 30 seconds ..." + sleep 30 + echo "Retrying ..." +done + + +# Now let's figure out if we're supposed to use wget or rsync for downloading +# +if echo "$DOWNLOADURL" | grep -q "^http" || \ + echo "$DOWNLOADURL" | grep -q "^ftp" + then + # Attempt to determine available bandwidth & to set BWLIMIT accordingly + wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ + --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img + cp --update "/tmp/x2gp-tce-initrd.img" "$TEMPDIR" + rm "/tmp/x2go-tce-initrd.img" + SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ + $7 == "-" { print $5 }' /tmp/dl.log \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -n "Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "KB/s") SIZEFACTOR=1;; + "MB/s") SIZEFACTOR=1024;; + "GB/s") SIZEFACTOR=1048576;; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ + { print $4 }' /tmp/dl.log \ + ) + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo "Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --limit-rate=${BWLIMIT}k $DOWNLOADURL" + +elif echo "$DOWNLOADURL" | grep -q "^rsync"; then + + rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ + $TEMPDIR/x2go-tce-initrd.img.new + mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img + SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $11 }' \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -n "Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "K") SIZEFACTOR=1;; + "M") SIZEFACTOR=1024;; + "G") SIZEFACTOR=$((1024*1024));; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $10 }') + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo "Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ + $TEMPDIR" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Unsupported download mechanism." + return 1 +fi +rm /tmp/dl.log + + +# Proceed to download from update location +# +while ! $DOWNLOADCOMMAND; do + echo "Sleeping 30 seconds ..." + sleep 30 + echo "Retrying ..." +done + +# Now check if these files are different from what we already have in our +# download directory on the boot medium +# +echo "Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." +if diff -q $DOWNLOADPATH $TEMPDIR \ + >/dev/null + + then + cleanup + echo "Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium +else + echo "Differences detected. Continuing ..." +fi + + +# If we made it past that point, it's time to update the boot medium, so let's +# remount it rw and async for speed +# +if mount -oremount,rw,async $MOUNTPOINT; then + echo "Remounted '$MOUNTPOINT' as rw and async." +else + echo "Could not remount '$MOUNTPOINT' as rw and async." +fi + + +# Now, we don't want to copy an index.htm(l) file, so let's do away with that +# +rm -f $TEMPDIR/index.ht* + + +# move everything over to the boot medium +# +echo "Moving $TEMPDIR/* => $DOWNLOADPATH" +mv $TEMPDIR/* $DOWNLOADPATH +cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? +if [ -n "$NTFSROOT" ]; then + echo "NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then + echo "Mount successful." + else + echo "Failed to mount NTFSROOT." + fi +fi + + +# let's check if we just downloaded a copy of our running system +# +echo "Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" +if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ + [ -d "$OTHERSYSTEMFULLPATH" ] ; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Nothing to do. Content of $DOWNLOADPATH equals" \ + "$RUNNINGSYSTEMNAME." + return 0 # current is newest, nothing to do, + # we want to keep the old system in OTHERSYSTEMFULLPATH + # as a fallback +fi + + +# make sure our destination path really exists +# +mkdir -p $OTHERSYSTEMFULLPATH + + +# let's check if our destination is already up to date or needs updating +# +echo "Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" +if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo "Nothing to do - content of '$DOWNLOADPATH' equals"\ + "'$OTHERSYSTEMNAME'." + return 0 # OTHERSYSTEMFULLPATH is already up to date +else + # keep rsyncing until the update is complete + echo "Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH + do + echo "Sleeping 30 seconds ..." + sleep 30 + echo "Retrying ..." + done +fi + + +# change default boot to the image we just downloaded and installed +# +if [ -n "$SYSLINUXPATH" ]; then + echo "Changing syslinux default to $OTHERSYSTEMNAME." + sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ + $SYSLINUXPATH/syslinux.cfg + +elif [ -n "$GRUBPATH" ]; then + MENULST=$GRUBPATH/menu.lst + CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') + CURRENTTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${RUNNINGSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') + CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) + OTHERTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${OTHERSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') + OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) + if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then + echo "Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ + $MENULST + else + echo "Not changing GRUB-legacy default." + echo "Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo "while default is set to position '$CURRENTDEFAULT'." + fi +else + echo "Unsupported bootloader." +fi + +# we're on an async mount point, so let's sync to be safe +# +sync + + +# umount tempdir to free memory +# +if [ -d $TEMPDIR ]; then + cleanup +fi + + +# now, change mount back to ro and sync +# +if [ -n "$NTFSROOT" ]; then + umount $MOUNTPOINT +else + mount -oremount,ro,sync $MOUNTPOINT +fi + +) & + +} + +LiveAutoUpdateMain + -- 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
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 9e4968356f94487023022d706200e32e1f295f73 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 1 01:44:43 2017 +0100 changed path-/filenames etc. to X2Go/x2go-tce prefix --- .../lib/live/config/2300-autoupdate | 42 ++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate index 8989bad..3f3b9ac 100755 --- a/config/includes.chroot/lib/live/config/2300-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-autoupdate @@ -112,10 +112,10 @@ else mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR fi -if ! ( [ -d "$MOUNTPOINT/boot/live-download" ] && \ +if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ ( \ - [ -d "$MOUNTPOINT/boot/live1" ] || \ - [ -d "$MOUNTPOINT/boot/live2" ] \ + [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ + [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ ) \ ); then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT @@ -148,20 +148,20 @@ RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) -if [ "$RUNNINGSYSTEMNAME" = "live1" ]; then - OTHERSYSTEMNAME="live2" -elif [ "$RUNNINGSYSTEMNAME" = "live2" ]; then - OTHERSYSTEMNAME="live1" +if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then + OTHERSYSTEMNAME="X2Go-live2" +elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then + OTHERSYSTEMNAME="X2Go-live1" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT echo "Unable to determine path/name of running system." return 1 fi OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") -DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/live-download/") +DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") -# Now we'll copy the content of the live-download folder to our tempdir +# Now we'll copy the content of the X2Go-live-download folder to our tempdir # this is so we can run wget in update mode (-N) or rsync without needing # write access to our boot medium (write access means increased wear and tear, # and we want to avoid that especially for media that has no wear-leveling @@ -181,9 +181,9 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ then # Attempt to determine available bandwidth & to set BWLIMIT accordingly wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/initrd.img - cp --update "/tmp/initrd.img" "$TEMPDIR" - rm "/tmp/initrd.img" + --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img + cp --update "/tmp/x2gp-tce-initrd.img" "$TEMPDIR" + rm "/tmp/x2go-tce-initrd.img" SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ $7 == "-" { print $5 }' /tmp/dl.log \ ) @@ -212,9 +212,9 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ elif echo "$DOWNLOADURL" | grep -q "^rsync"; then - rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/initrd.img \ - $TEMPDIR/initrd.img.new - mv $TEMPDIR/initrd.img.new $TEMPDIR/initrd.img + rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ + $TEMPDIR/x2go-tce-initrd.img.new + mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ awk '$4 == "sent" && $12 == "bytes/sec" \ { print $11 }' \ @@ -346,16 +346,20 @@ fi # change default boot to the image we just downloaded and installed # if [ -n "$SYSLINUXPATH" ]; then - echo "Changing syslinux default to $OTHERSYSTEMNAME-486." - sed -i -e"/^default/cdefault $OTHERSYSTEMNAME-486" \ + echo "Changing syslinux default to $OTHERSYSTEMNAME." + sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ $SYSLINUXPATH/syslinux.cfg elif [ -n "$GRUBPATH" ]; then MENULST=$GRUBPATH/menu.lst CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') - CURRENTTITLEPOSITION=$(grep '^title' $MENULST | grep -n "${RUNNINGSYSTEMNAME}-486" | awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}-486"'/ { print $1 }') + CURRENTTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${RUNNINGSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) - OTHERTITLEPOSITION=$(grep '^title' $MENULST | grep -n "${OTHERSYSTEMNAME}-486" | awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}-486"'/ { print $1 }') + OTHERTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${OTHERSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then echo "Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." -- 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
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 7f19246ae30335753cc1d946ae8ce1db0279d352 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Dec 27 18:28:23 2016 +0100 added patch to share ssh secret keys between X2GoClient for Windows in portable mode and X2Go-TCE isohybrid residing on same USB media --- .../lib/live/config/2410-getopensshkey | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2410-getopensshkey b/config/includes.chroot/lib/live/config/2410-getopensshkey new file mode 100755 index 0000000..c6b3859 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2410-getopensshkey @@ -0,0 +1,42 @@ +#!/bin/sh + + +X2GoGetOpenSSHKey () +{ +# Output startup message +# +echo -n " x2go-getopensshkey" + +# This script is for using the iso-hybrid image along with the "second partition" patch +# it allows you to share ssh secret keys between X2GoClient for Windows in portable +# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions + +# Homedir des clientseitigen X2Go-ThinClient-Accounts +# +X2GOHOME="/var/lib/x2gothinclient/" + +# Homedir der Portable-App-Installation +# +HOME="/media/PORTABLEAPP/" + +# .ssh-Directory anlegen, das existiert zu diesem Zeitpunkt noch nicht +# +mkdir -p $(readlink -m "$X2GOHOME/.ssh/") + +for KEYFILE in $HOME/ssh/* ; do + [ -s "$KEYFILE" ] || continue + KEYDESTPATH="$X2GOHOME/.ssh/$(basename "$KEYFILE")" + touch "$KEYDESTPATH" + chown x2gothinclient:x2gothinclient \ + $KEYDESTPATH + chmod 600 $KEYDESTPATH + cat $(readlink -m "$KEYFILE")>$KEYDESTPATH + +done + +ln -s $X2GOHOME/.ssh $X2GOHOME/ssh + +} + +X2GoGetOpenSSHKey + -- 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
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 01c387f769c26ab05be2b45ad1798bc8585ce67f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 31 20:21:23 2016 +0100 fixed whitespace detection around cmdline parameters --- config/includes.chroot/lib/live/config/2100-lockuser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2100-lockuser b/config/includes.chroot/lib/live/config/2100-lockuser index 7f89531..1cbcc15 100755 --- a/config/includes.chroot/lib/live/config/2100-lockuser +++ b/config/includes.chroot/lib/live/config/2100-lockuser @@ -10,7 +10,7 @@ echo -n " lockuser" # Set password # -if grep -q " *nouser *" /proc/cmdline ; then +if grep -q "\W*nouser\W*" /proc/cmdline ; then passwd -l user >/dev/null 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
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 41cce6a83f0658148a34989693afc6fee6d16ab4 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jan 1 01:03:22 2017 +0100 fixed whitespace detection around cmdline parameters --- config/includes.chroot/lib/live/config/2500-tcpprint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index ded7412..225a6ec 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -7,7 +7,7 @@ TcpPrint () # echo -n " tcpprint" -if grep -q " *tcpprint *" /proc/cmdline ; then +if grep -q "\W*tcpprint\W*" /proc/cmdline ; then TCPPRINTONLYFROM=$(cat /proc/cmdline | \ tr ' ' '\n' | \ awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }') -- 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
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 0bff86a05912fef14ba1d72cda8cd02ac8d3d730 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Dec 31 22:53:29 2016 +0100 make autoupdater wait until tty10 becomes available --- config/includes.chroot/lib/live/config/2300-autoupdate | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate index ebc2bb5..8989bad 100755 --- a/config/includes.chroot/lib/live/config/2300-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-autoupdate @@ -34,6 +34,10 @@ echo -n " autoupdater (backgrounding update task)" # ( +# wait until terminal is available +while ! [ -c /dev/tty10 ] ; do + sleep 10 +done # redirect all output to console #10 # -- 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
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 2a9ae55f12a3410e20acf6e7d668e623f6358b6d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 02:30:50 2017 +0100 added support for incomplete and dash-separated ntfs uuids --- config/includes.chroot/lib/live/config/2300-autoupdate | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate index 3f3b9ac..38a579b 100755 --- a/config/includes.chroot/lib/live/config/2300-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-autoupdate @@ -100,6 +100,16 @@ sleep $SLEEPTIME NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') if [ -n "$NTFSROOT" ]; then mkdir -p /lib/live/mount/ntfsroot + # This is in case we've been passed an incomplete UUID and/or one with dashes + # For example, "vol c:" on Windows will return the last 8 digits of the UUID + # only, and separate them with a dash. + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(echo $NTFSROOT | tr -d '-') + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1) + fi + fi + mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot MOUNTPOINT="/lib/live/mount/ntfsroot/" # create a temporary directory -- 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
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 584b9a922e459836def43a299637fee3427434ee Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 09:36:51 2017 +0100 added some status messages and error checking --- .../lib/live/config/2300-live-autoupdate | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 520b1a3..62afd3c 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -110,7 +110,12 @@ if [ -n "$NTFSROOT" ]; then fi fi - mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then + echo "Mounted '/dev/disk/by-uuid/$NTFSROOT'." + else + echo "Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + fi + # TODO: Further error handling MOUNTPOINT="/lib/live/mount/ntfsroot/" # create a temporary directory TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) @@ -399,9 +404,17 @@ fi # now, change mount back to ro and sync # if [ -n "$NTFSROOT" ]; then - umount $MOUNTPOINT + if umount $MOUNTPOINT; then + echo "Unmounted '$MOUNTPOINT'." + else + echo "Unable to unmount '$MOUNTPOINT'." + fi else - mount -oremount,ro,sync $MOUNTPOINT + if mount -oremount,ro,sync $MOUNTPOINT; then + echo "Remounted '$MOUNTPOINT' ro and sync." + else + echo "Unable to remount '$MOUNTPOINT' ro and sync." + fi 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
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 e246b47e033ccfdc3308d0ac947c59ef827ab97a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 09:32:13 2017 +0100 name change --- .../lib/live/config/2300-autoupdate | 412 --------------------- 1 file changed, 412 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate deleted file mode 100755 index 38a579b..0000000 --- a/config/includes.chroot/lib/live/config/2300-autoupdate +++ /dev/null @@ -1,412 +0,0 @@ -#!/bin/sh - -cleanup () -{ # discard contents of tmpfs, umount if necessary - if [ -n "$NTFSROOT" ]; then - echo "Removing '$TEMPDIR/*'." - rm -rf $TEMPDIR/* - else - echo "Unmounting '$TEMPDIR'." - umount $TEMPDIR - fi - if rmdir $TEMPDIR; then - echo "Removed empty directory '$TEMPDIR'." - else - echo "Could not remove directory '$TEMPDIR'." - fi - if [ -n "$NTFSROOT" ]; then - if umount $MOUNTPOINT; then - echo "Unmounted '$MOUNTPOINT'." - else - echo "Could not unmount '$MOUNTPOINT'." - fi - fi -} - -AutoUpdateMain () -{ -# Output startup message -# -echo -n " autoupdater (backgrounding update task)" - - -# Background everything -# -( - -# wait until terminal is available -while ! [ -c /dev/tty10 ] ; do - sleep 10 -done - -# redirect all output to console #10 -# -exec >/dev/tty10 2>&1 - - -# clear console -# -clear - - -# This is so grep, awk and sed will match the right terms regardless of LANG -# -unset LANG -unset LC_ALL -unset LC_MESSAGES - - -# download url pointing to directory with all required files goes here -DOWNLOADURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^updateurl=/ { print $2 }') - -if [ -z "$DOWNLOADURL" ]; then - echo "No update URL. Exiting." - return 0 -fi - -# Bandwidth limit goes here -# -#BWLIMITPERCENT=20 # in percent, numeric-only -BWLIMITPERCENT=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^bwlimit=/ { print $2 }') -if [ -z "$BWLIMITPERCENT" ]; then - BWLIMITPERCENT=20 - echo "Bandwidth limit not set. Defaulting to 20%." -fi - - - -# sleeping a random amount of time to ease load on the update server -# -SLEEPTIME=0 -echo -n "Calculating random update delay (120-900 seconds)..." -while [ $SLEEPTIME -lt 120 ]; do - echo -n "." - # During startup, script is run with /bin/sh, - # even when #!/bin/bash is set, - # so we need to improvise. - RND=$(/bin/bash -c 'echo $RANDOM') - SLEEPTIME=$((RND%900)) -done -echo " " -echo "Sleeping for $SLEEPTIME seconds ..." -sleep $SLEEPTIME - - -# Define our mountpoint and check if we're capable of auto-updating -NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') -if [ -n "$NTFSROOT" ]; then - mkdir -p /lib/live/mount/ntfsroot - # This is in case we've been passed an incomplete UUID and/or one with dashes - # For example, "vol c:" on Windows will return the last 8 digits of the UUID - # only, and separate them with a dash. - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(echo $NTFSROOT | tr -d '-') - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1) - fi - fi - - mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot - MOUNTPOINT="/lib/live/mount/ntfsroot/" - # create a temporary directory - TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) -else - MOUNTPOINT="/lib/live/mount/findiso/" - # create a temporary directory and mount a tmpfs there - TEMPDIR=$(mktemp -d --tmpdir=/mnt) - IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') - mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR - -fi -if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ - ( \ - [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ - [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ - ) \ - ); then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "No directories suitable for update." - return 0 # directories missing, most likely not a writeable medium -fi - - -# define and figure out some paths that we will be needing later on -# -if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then - SYSLINUXPATH="$MOUNTPOINT/" -elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then - SYSLINUXPATH="$MOUNTPOINT/syslinux/" -elif [ -f "$MOUNTPOINT/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/" -elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/grub/" -elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/boot/grub/" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "No suitable bootloader found." - return 1 -fi - -RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^findiso=/ { print $2 }')")) - -ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) -RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) -if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then - OTHERSYSTEMNAME="X2Go-live2" -elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then - OTHERSYSTEMNAME="X2Go-live1" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Unable to determine path/name of running system." - return 1 -fi -OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") -DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") - - -# Now we'll copy the content of the X2Go-live-download folder to our tempdir -# this is so we can run wget in update mode (-N) or rsync without needing -# write access to our boot medium (write access means increased wear and tear, -# and we want to avoid that especially for media that has no wear-leveling -# like CF cards) -# -while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo "Sleeping 30 seconds ..." - sleep 30 - echo "Retrying ..." -done - - -# Now let's figure out if we're supposed to use wget or rsync for downloading -# -if echo "$DOWNLOADURL" | grep -q "^http" || \ - echo "$DOWNLOADURL" | grep -q "^ftp" - then - # Attempt to determine available bandwidth & to set BWLIMIT accordingly - wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img - cp --update "/tmp/x2gp-tce-initrd.img" "$TEMPDIR" - rm "/tmp/x2go-tce-initrd.img" - SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ - $7 == "-" { print $5 }' /tmp/dl.log \ - ) - case $SIZEFACTORSTRING in - "" | \ - [0-9]) echo -n "Not enough Bandwidth for update task - " - echo -n "aborting." - cleanup - return 0 - ;; - "KB/s") SIZEFACTOR=1;; - "MB/s") SIZEFACTOR=1024;; - "GB/s") SIZEFACTOR=1048576;; - *) SIZEFACTOR=$((1024*1024*1024));; - esac - DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ - { print $4 }' /tmp/dl.log \ - ) - BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ - awk ' { print $1*$2*$3/100 }' | \ - awk -F'.' '{ print $1 }' \ - ) # outputs integer kilobytes, not rounded - echo "Determined bandwidth limit: '$BWLIMIT KB/s'" - DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ - --limit-rate=${BWLIMIT}k $DOWNLOADURL" - -elif echo "$DOWNLOADURL" | grep -q "^rsync"; then - - rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ - $TEMPDIR/x2go-tce-initrd.img.new - mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img - SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ - awk '$4 == "sent" && $12 == "bytes/sec" \ - { print $11 }' \ - ) - case $SIZEFACTORSTRING in - "" | \ - [0-9]) echo -n "Not enough Bandwidth for update task - " - echo -n "aborting." - cleanup - return 0 - ;; - "K") SIZEFACTOR=1;; - "M") SIZEFACTOR=1024;; - "G") SIZEFACTOR=$((1024*1024));; - *) SIZEFACTOR=$((1024*1024*1024));; - esac - DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ - awk '$4 == "sent" && $12 == "bytes/sec" \ - { print $10 }') - BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ - awk ' { print $1*$2*$3/100 }' | \ - awk -F'.' '{ print $1 }' \ - ) # outputs integer kilobytes, not rounded - echo "Determined bandwidth limit: '$BWLIMIT KB/s'" - DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ - $TEMPDIR" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Unsupported download mechanism." - return 1 -fi -rm /tmp/dl.log - - -# Proceed to download from update location -# -while ! $DOWNLOADCOMMAND; do - echo "Sleeping 30 seconds ..." - sleep 30 - echo "Retrying ..." -done - -# Now check if these files are different from what we already have in our -# download directory on the boot medium -# -echo "Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." -if diff -q $DOWNLOADPATH $TEMPDIR \ - >/dev/null - - then - cleanup - echo "Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." - return 0 # current is newest, nothing to do, we want to avoid - # unneccessary writes to the medium -else - echo "Differences detected. Continuing ..." -fi - - -# If we made it past that point, it's time to update the boot medium, so let's -# remount it rw and async for speed -# -if mount -oremount,rw,async $MOUNTPOINT; then - echo "Remounted '$MOUNTPOINT' as rw and async." -else - echo "Could not remount '$MOUNTPOINT' as rw and async." -fi - - -# Now, we don't want to copy an index.htm(l) file, so let's do away with that -# -rm -f $TEMPDIR/index.ht* - - -# move everything over to the boot medium -# -echo "Moving $TEMPDIR/* => $DOWNLOADPATH" -mv $TEMPDIR/* $DOWNLOADPATH -cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? -if [ -n "$NTFSROOT" ]; then - echo "NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." - if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo "Mount successful." - else - echo "Failed to mount NTFSROOT." - fi -fi - - -# let's check if we just downloaded a copy of our running system -# -echo "Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" -if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ - [ -d "$OTHERSYSTEMFULLPATH" ] ; then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Nothing to do. Content of $DOWNLOADPATH equals" \ - "$RUNNINGSYSTEMNAME." - return 0 # current is newest, nothing to do, - # we want to keep the old system in OTHERSYSTEMFULLPATH - # as a fallback -fi - - -# make sure our destination path really exists -# -mkdir -p $OTHERSYSTEMFULLPATH - - -# let's check if our destination is already up to date or needs updating -# -echo "Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" -if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Nothing to do - content of '$DOWNLOADPATH' equals"\ - "'$OTHERSYSTEMNAME'." - return 0 # OTHERSYSTEMFULLPATH is already up to date -else - # keep rsyncing until the update is complete - echo "Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" - while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH - do - echo "Sleeping 30 seconds ..." - sleep 30 - echo "Retrying ..." - done -fi - - -# change default boot to the image we just downloaded and installed -# -if [ -n "$SYSLINUXPATH" ]; then - echo "Changing syslinux default to $OTHERSYSTEMNAME." - sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ - $SYSLINUXPATH/syslinux.cfg - -elif [ -n "$GRUBPATH" ]; then - MENULST=$GRUBPATH/menu.lst - CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') - CURRENTTITLEPOSITION=$(grep '^title' $MENULST | - grep -n "${RUNNINGSYSTEMNAME}" | - awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') - CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) - OTHERTITLEPOSITION=$(grep '^title' $MENULST | - grep -n "${OTHERSYSTEMNAME}" | - awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') - OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) - if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo "Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." - sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ - $MENULST - else - echo "Not changing GRUB-legacy default." - echo "Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo "while default is set to position '$CURRENTDEFAULT'." - fi -else - echo "Unsupported bootloader." -fi - -# we're on an async mount point, so let's sync to be safe -# -sync - - -# umount tempdir to free memory -# -if [ -d $TEMPDIR ]; then - cleanup -fi - - -# now, change mount back to ro and sync -# -if [ -n "$NTFSROOT" ]; then - umount $MOUNTPOINT -else - mount -oremount,ro,sync $MOUNTPOINT -fi - -) & - -} - -AutoUpdateMain - -- 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
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 e8bd9c393d32e22a14a4d43dc3986c8aed0d1407 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:04:24 2017 +0100 name change --- .../includes.chroot/lib/live/config/{2000-ipconfig => 2000-showifconfig} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-ipconfig b/config/includes.chroot/lib/live/config/2000-showifconfig similarity index 100% rename from config/includes.chroot/lib/live/config/2000-ipconfig rename to config/includes.chroot/lib/live/config/2000-showifconfig -- 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
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 d0e53421114053d7f650ea52dcb94981fe7c6ed9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:05:59 2017 +0100 name change --- .../live/config/{2200-x11-getxorgconf => 2200-xserver-xorg-getxorgconf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2200-x11-getxorgconf b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf similarity index 100% rename from config/includes.chroot/lib/live/config/2200-x11-getxorgconf rename to config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf -- 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
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 95680363cf8d9b24e8945118c9fba94cd008be4a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:05:21 2017 +0100 name change --- config/includes.chroot/lib/live/config/2000-showifconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index fb108ea..20896d4 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -1,11 +1,11 @@ #!/bin/bash -IFConfig () +ShowIFConfig () { # Output startup message # -echo -n " ifconfig" +echo -n " showifconfig" #setterm -term linux -r >/dev/tty9 # Make sure no language-specific stuff interferes with our matching @@ -36,4 +36,4 @@ chmod 755 /etc/network/if-up.d/showips } -IFConfig +ShowIFConfig -- 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
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 896c6feb87716c3c8db1a9a3dc92a4c014944c3d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:07:22 2017 +0100 name change --- .../includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 d28bf04..2dd20da 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -1,10 +1,10 @@ #!/bin/sh -X11GetXorgConf () +XServerXorgGetXorgConf () { # Output startup message # -echo -n " x11-getxorgconf" +echo -n " xserver-xorg-getxorgconf" XORGCONFURL=$(cat /proc/cmdline | \ tr ' ' '\n' | \ @@ -42,4 +42,4 @@ GETXORG chmod 755 /etc/network/if-up.d/getxorgconf fi } -X11GetXorgConf +XServerXorgGetXorgConf -- 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
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 32ff344982270c5afbe77d5808b7efd206f284f7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:10:31 2017 +0100 name change --- .../config/{2150-getsshkeyfromserver => 2150-getsshpubkeysfromserver} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2150-getsshkeyfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver similarity index 100% rename from config/includes.chroot/lib/live/config/2150-getsshkeyfromserver rename to config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver -- 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
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 c0d363e07eebbc7a842416bc41ab21c9601ee335 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:08:02 2017 +0100 name change --- .../lib/live/config/{2150-setsshkey => 2150-getsshkeyfromserver} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2150-setsshkey b/config/includes.chroot/lib/live/config/2150-getsshkeyfromserver similarity index 100% rename from config/includes.chroot/lib/live/config/2150-setsshkey rename to config/includes.chroot/lib/live/config/2150-getsshkeyfromserver -- 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
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 712e5f8185bfe308e85cd841c845258bdc3b9a57 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:41:59 2017 +0100 added support for updatesleep parameter --- .../lib/live/config/2300-live-autoupdate | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 62afd3c..ee24683 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -81,17 +81,22 @@ fi # sleeping a random amount of time to ease load on the update server # +MAXSLEEPTIME=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') +if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 120 ] ; then + MAXSLEEPTIME=900 +fi SLEEPTIME=0 -echo -n "Calculating random update delay (120-900 seconds)..." -while [ $SLEEPTIME -lt 120 ]; do - echo -n "." - # During startup, script is run with /bin/sh, - # even when #!/bin/bash is set, - # so we need to improvise. - RND=$(/bin/bash -c 'echo $RANDOM') - SLEEPTIME=$((RND%900)) -done -echo " " +echo "Calculating random update delay (120-$MAXSLEEPTIME seconds)..." +# During startup, script is run with /bin/sh, +# even when #!/bin/bash is set, +# so we need to improvise. +RND=$(/bin/bash -c 'echo $RANDOM') +SLEEPTIME=$((RND%MAXSLEEPTIME)) +if [ $SLEEPTIME -lt 120 ]; then + SLEEPTIME=$((SLEEPTIME+120)) +fi echo "Sleeping for $SLEEPTIME seconds ..." sleep $SLEEPTIME -- 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
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 d3d26ea2bb3caae08f516cf146f456dc1ad97bd7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:10:42 2017 +0100 name change --- .../lib/live/config/2150-getsshpubkeysfromserver | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index a40918d..e613d35 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -1,11 +1,11 @@ #!/bin/sh -SetSSHKey () +GetSSHPubKeysFromServer () { # Output startup message # - echo -n " setsshkey" + echo -n " getsshpubkeysfromserver" PUBKEYURL=$(cat /proc/cmdline | \ @@ -13,7 +13,7 @@ SetSSHKey () awk -F'=' ' /^pubkey=/ { print $2 }') if [ -n "$PUBKEYURL" ] ; then - cat >/etc/network/if-up.d/getpubkey <<GETPUBKEY + cat >/etc/network/if-up.d/getsshpubkeysfromserver <<GETPUBKEY #!/bin/bash export TERM=linux; @@ -45,10 +45,10 @@ else fi GETPUBKEY - chmod 755 /etc/network/if-up.d/getpubkey + chmod 755 /etc/network/if-up.d/getsshpubkeysfromserver fi } -SetSSHKey +GetSSHPubKeysFromServer -- 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
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 d66c8b24f95f996519517e0d58e5cd2536110758 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:57:12 2017 +0100 name change, adapted to work with new TCE --- .../lib/live/config/2400-x2go-getportableappsettings | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings index b607643..9444f01 100755 --- a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings +++ b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings @@ -1,11 +1,11 @@ #!/bin/sh -GetPortableAppSettings () +X2GoGetPortableAppSettings () { # Output startup message # -echo -n " getportableappsettings" +echo -n " x2go-getportableappsettings" # This script is for using the iso-hybrid image along with the "second partition" patch # it allows you to share a configuration between X2GoClient for Windows in portable @@ -14,10 +14,10 @@ echo -n " getportableappsettings" if [ -L /dev/disk/by-label/PORTABLEAPP ]; then mkdir -p /media/PORTABLEAPP && \ mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \ - ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions + ln -sf /media/PORTABLEAPP/x2goclient/sessions /home/user/.x2goclient/sessions else true fi } -GetPortableAppSettings +X2GoGetPortableAppSettings -- 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
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 8e666d78ab70304213252aefb22748f917d4a5e7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:59:07 2017 +0100 undid path change --- config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings index 9444f01..f565018 100755 --- a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings +++ b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings @@ -14,7 +14,7 @@ echo -n " x2go-getportableappsettings" if [ -L /dev/disk/by-label/PORTABLEAPP ]; then mkdir -p /media/PORTABLEAPP && \ mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \ - ln -sf /media/PORTABLEAPP/x2goclient/sessions /home/user/.x2goclient/sessions + ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions else true 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
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 c19bb213f5b95486515c8a587478d30b6d8370a3 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:55:00 2017 +0100 name change --- .../{2400-getportableappsettings => 2400-x2go-getportableappsettings} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-getportableappsettings b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings similarity index 100% rename from config/includes.chroot/lib/live/config/2400-getportableappsettings rename to config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings -- 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
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 c9e369609ede2889804c7776b54991be62712988 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:43:32 2017 +0100 name change --- .../lib/live/config/{2410-getopensshkey => 2410-x2go-getopensshkey} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2410-getopensshkey b/config/includes.chroot/lib/live/config/2410-x2go-getopensshkey similarity index 100% rename from config/includes.chroot/lib/live/config/2410-getopensshkey rename to config/includes.chroot/lib/live/config/2410-x2go-getopensshkey -- 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
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 2f91ffd839414a780c272c026d21653c6ad0dacb Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:50:53 2017 +0100 name change --- .../lib/live/config/2410-x2go-getopensshkey | 42 ---------------------- 1 file changed, 42 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2410-x2go-getopensshkey b/config/includes.chroot/lib/live/config/2410-x2go-getopensshkey deleted file mode 100755 index c6b3859..0000000 --- a/config/includes.chroot/lib/live/config/2410-x2go-getopensshkey +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - - -X2GoGetOpenSSHKey () -{ -# Output startup message -# -echo -n " x2go-getopensshkey" - -# This script is for using the iso-hybrid image along with the "second partition" patch -# it allows you to share ssh secret keys between X2GoClient for Windows in portable -# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions - -# Homedir des clientseitigen X2Go-ThinClient-Accounts -# -X2GOHOME="/var/lib/x2gothinclient/" - -# Homedir der Portable-App-Installation -# -HOME="/media/PORTABLEAPP/" - -# .ssh-Directory anlegen, das existiert zu diesem Zeitpunkt noch nicht -# -mkdir -p $(readlink -m "$X2GOHOME/.ssh/") - -for KEYFILE in $HOME/ssh/* ; do - [ -s "$KEYFILE" ] || continue - KEYDESTPATH="$X2GOHOME/.ssh/$(basename "$KEYFILE")" - touch "$KEYDESTPATH" - chown x2gothinclient:x2gothinclient \ - $KEYDESTPATH - chmod 600 $KEYDESTPATH - cat $(readlink -m "$KEYFILE")>$KEYDESTPATH - -done - -ln -s $X2GOHOME/.ssh $X2GOHOME/ssh - -} - -X2GoGetOpenSSHKey - -- 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
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 d11d6cb74f7623d37c00fa45c1e82562ec6e1b17 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:50:32 2017 +0100 name change, adapted to work with new TCE --- .../config/2410-x2go-getopensshportableclientkey | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey b/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey new file mode 100755 index 0000000..1f7b486 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey @@ -0,0 +1,46 @@ +#!/bin/sh + + +X2GoGetOpenSSHPortableClientKey () +{ + # Output startup message + # + echo -n " x2go-getopensshportableclientkey" + + # This script is for using the iso-hybrid image along with the "second partition" patch + # it allows you to share ssh secret keys between X2GoClient for Windows in portable + # mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions + + # Homedir of client side X2Go ThinClient Account + # + X2GOHOME="/home/user/" + + # Homedir of Portable App Installation + # + HOME="/media/PORTABLEAPP/" + + if [ -d "$HOME" ] && [ -d "$X2GOHOME" ]; then + + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$X2GOHOME/.ssh/") + + for KEYFILE in $HOME/ssh/* ; do + [ -s "$KEYFILE" ] || continue + KEYDESTPATH="$X2GOHOME/.ssh/$(basename "$KEYFILE")" + touch "$KEYDESTPATH" + chown user:user \ + $KEYDESTPATH + chmod 600 $KEYDESTPATH + cat $(readlink -m "$KEYFILE")>$KEYDESTPATH + + done + + # this is so the path name in the sessions file matches again + # (cannot use .ssh on FAT, for example) + ln -s $X2GOHOME/.ssh $X2GOHOME/ssh + fi +} + +X2GoGetOpenSSHPortableClientKey + -- 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
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 e1493d01a1b0ab972798f4b63bcdd2b6e41c2b94 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 11:00:17 2017 +0100 name change --- ...{2400-x2go-getportableappsettings => 2400-x2go-getportableappsessions} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions similarity index 100% rename from config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings rename to config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions -- 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
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 078cead528df437aef7adb32f0d0ec97b2f16b9a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 16:18:13 2017 +0100 -e was missing at echo, thus literal backslash n was being printed --- config/includes.chroot/lib/live/config/2500-tcpprint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index 225a6ec..6026f44 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -28,7 +28,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 "\nSetting up local printers ..." >>/dev/tty9 + echo -e "\nSetting up local printers ..." >>/dev/tty9 # Create a listening port for a TCP/9100-RAW-printer # -- 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
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 ff36d6050f394d9f513b8d2e2101cb4c87887cf6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 13:33:58 2017 +0100 fixed calculation error - lower limit for maximum sleep time must be 240, as 239 might be a valid result when calculating the minimum sleep time --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 8c26223..6b94e2b 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -84,7 +84,7 @@ fi MAXSLEEPTIME=$(cat /proc/cmdline | \ tr ' ' '\n' | \ awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') -if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 120 ] ; then +if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then MAXSLEEPTIME=900 fi SLEEPTIME=0 -- 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
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 9277628f7d93ea55be3df2d051671b83792d8572 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 11:20:34 2017 +0100 detection of NTFSROOT when given an incomplete UUID would fail --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index ee24683..8c26223 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -111,7 +111,7 @@ if [ -n "$NTFSROOT" ]; then if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then NTFSROOT=$(echo $NTFSROOT | tr -d '-') if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1) + NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) fi 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
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 71b7b7c1c0f6283a9eaef37a62a15499dd4b2fc6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jan 2 10:59:54 2017 +0100 name change --- .../lib/live/config/2400-x2go-getportableappsettings | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings index f565018..4e417db 100755 --- a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings +++ b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsettings @@ -1,11 +1,11 @@ #!/bin/sh -X2GoGetPortableAppSettings () +X2GoGetPortableAppSessions () { # Output startup message # -echo -n " x2go-getportableappsettings" +echo -n " x2go-getportableappsessions" # This script is for using the iso-hybrid image along with the "second partition" patch # it allows you to share a configuration between X2GoClient for Windows in portable @@ -20,4 +20,4 @@ else fi } -X2GoGetPortableAppSettings +X2GoGetPortableAppSessions -- 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
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 57f52a4861a6f80399628bfa58cf2a98578e9596 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 14 00:23:21 2017 +0100 typofix --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 6b94e2b..587a4c8 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -202,7 +202,7 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ # Attempt to determine available bandwidth & to set BWLIMIT accordingly wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img - cp --update "/tmp/x2gp-tce-initrd.img" "$TEMPDIR" + cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" rm "/tmp/x2go-tce-initrd.img" SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ $7 == "-" { print $5 }' /tmp/dl.log \ -- 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
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 44698aba536f5307c91d5d7ea74cb9b6769e3253 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 14 01:04:32 2017 +0100 changed wget output to progress bar style in all cases --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 1 + 1 file changed, 1 insertion(+) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 9e6a310..8b351fd 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -230,6 +230,7 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ ) # outputs integer kilobytes, not rounded echo "Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" elif echo "$DOWNLOADURL" | grep -q "^rsync"; then -- 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
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 d0b205c8d03ba91ef9e18a47da9253e7e74d866f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jan 14 00:50:41 2017 +0100 wget output is different for ftp, changes to SIZEFACTORSTRING and DLRATE required --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 587a4c8..9e6a310 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -205,7 +205,8 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" rm "/tmp/x2go-tce-initrd.img" SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ - $7 == "-" { print $5 }' /tmp/dl.log \ + $7 == "-" { print $5 }' /tmp/dl.log | \ + tail -1 \ ) case $SIZEFACTORSTRING in "" | \ @@ -220,7 +221,8 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ *) SIZEFACTOR=$((1024*1024*1024));; esac DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ - { print $4 }' /tmp/dl.log \ + { print $4 }' /tmp/dl.log | \ + tail -1 ) BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ awk ' { print $1*$2*$3/100 }' | \ -- 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
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 302cf5e4251b92387d90dca0a9b6513e5f358b1f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 16:52:51 2017 +0100 add setting to confine x2gothinclient to systray --- .../x2gothinclient_init.d/020_x2gothinclient-confine-to-tray | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray new file mode 100755 index 0000000..8c2d046 --- /dev/null +++ b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ -z "$X2GO_HANDLE_DAEMON" ] ; then + mkdir -p ~x2gothinclient/.x2goclient + echo '[trayicon]' >>~x2gothinclient/.x2goclient/settings + echo 'enabled=true' >>~x2gothinclient/.x2goclient/settings + chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf + chmod go-rwx ~x2gothinclient -Rf +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
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 04f795403ba9e167d5d10eb76f57e79bbd4bc86d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 12:17:28 2017 +0100 added x2go repo for binary --- config/archives/x2go.key.binary | 42 ++++++++++++++++++++++++++++++++++++++++ config/archives/x2go.list.binary | 2 ++ 2 files changed, 44 insertions(+) diff --git a/config/archives/x2go.key.binary b/config/archives/x2go.key.binary new file mode 100644 index 0000000..d024d38 --- /dev/null +++ b/config/archives/x2go.key.binary @@ -0,0 +1,42 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBE15RZ4BCADGlna23kyfn96REJA7A+md74rAAsdvq3a2U1M9ghlta+6yOPGi +XTSHykAYaJXrYXM8PlbVsb+ub4VyDpQHbr7U1L0hicSPd+h14yXLm5T+PyZpKvLV +5OWP0dU4LkOvDIWN/EyMnUd6eHQrDo2FW8dPsJ95Pq6Ido264wHMz1LhnjOAb8s7 +qB8cn8t/+8lg28f6R+BcE926WJyEyZ/akvvo09MliNCshZyyW8/l76nSLGF/GzqY +B0bNJi7LjMuOyrN+yhKhGXvmfXx5bwRXwBlWHxYfe3KWuTD/6KtHCjTgkEQMaBi3 +rRM8gEiVcr0oNNAu9F7XhVtaIhE9YleyKpapABEBAAG0LlgyZ28gRGViaWFuL1Vi +dW50dSBQYWNrYWdpbmcgPGRlYmlhbkB4MmdvLm9yZz6JATgEEwECACIFAk15RZ4C +GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOH5WDhb/ituqHMH/jORk1Da +g6WPTzCwitrrYBetrjIOK/tudtjo6tJwtkIkRwjMQOmaJt95wTMqn52KiNm6NNyJ +GRchuQBDn9roDRH8D19DT1J/DlVsckeWgP25IcEqLb3WC4BZspEGI8K3hfk9K0nM +BLviWvoSmOxSPdD4ALpKt+q/URyUcfMlkEeiRRzQ6gb6iB0yRjWf4v0s7PbAH9J7 +XRRO/wBpBesLYJ5cKlD6WGIwDN1h9Qkc3QVg7OcmDPwc9s1CKu+JZ2MLutNAWH3a +whXdzNkg+4wycA6lVsInH7t3brxpX83SqMeYPQp789G63HULcYaJ/NqbHjF5AhG3 +12NVv94774ZsPC2JAhwEEAEIAAYFAlB6n0QACgkQmvRrMCV3GzFWKQ/9GO8CIwqI ++4N/1bBO1cPpCc6S1I4rgHpYngBdDQLZBI9B2YA2niVVRbQFWbQ0JDcWEs36qNdl +XwyTgm/OHTvUV7AD/xX5YdNwcEOX6zkQZPefk/BAa+J5iWoPlFU2bbYW2Yw2vHtk +qbAiAny2EwKnW8WySp8L1VuxB/dJaIuc4/x27nnxqfoYBSbFCCJ8FLNJBPqvtOXj +1GA5Q2V/qay8ZT/3KvzBSKa4aBLD5LVNZ4G1Ea6qBjWZzeM404RejoX9DNvxv1pd +OW+Qc8xX4uEE1Z6FhstPvRxLNtBmX3G0KsH0QTvyYWkFMrzuHptJUcwLBd7+h5qv +ZdVSEfKuB5qNyhgJfJDoeBEBHDmU9BmWWjooQi1OdoQC09MCzsP1t1/ULnvFVjou +oDZQ0hgCsY2beo9x7kmjdWqlj8wAAPKIbh/gCmu618slCv95qb8RN8C9IU3Wr3+S +hyo4b2X3ga2v9B7KA5oi+MK3VIdr2NN9Nl4DupXZHmeEyfofBBwAZ84JkorR/lOk +kX5obOObWeRV8eC9Lm7htai9ze7zK05LXNhja0DE+tECRrE0iX1gO6uP8fFvyuC4 +R13Ic3iWj4ItpOUFce7SCMsrAiFOinEXUcaBpGRnNPsM47MeaHvK0dnj1zzL5Rqv +VylsWTfJpAkUC8oN/Ci3NasRpWZmJxVD9rW5AQ0ETXlFngEIAM2uI+UFCU4upRqh +5ek6cLvLvO2Aq+mYAwD1yXE9YNdaOMxZJ+ADf82PjCRkXIegRdaeKbMzqeUVs3+2 +CDSOkjrAS/VubHcDrzD2/uDHH5FDjMFBSiVQ5J5yV4M2p8Bm/9eyZxy5z53dzQSY +wLVuk2OYK1fSdyYtCM9anBJKZ/61gmObrJO+tt3wM/1ac465YSBpMB/IjiGZ97UI +rUIHF7Ql7hpKCoELtwzruk0D5/YWka6AunAHRiww/FFgUVLIJxkBIxd4bkP+5EzH +knLDDl5c29rf79nBNVFUNMnHNVvvuy5Z1raLdv7a9Ni2bgGIQ4wTusmPizVkdHnm +gad/EzkAEQEAAYkBHwQYAQIACQUCTXlFngIbDAAKCRDh+Vg4W/4rbnf1B/wPz2G2 +BWDn1HNsR43l6n9itsNig5TcDEfh8hrWAP0/mwAMYgRD08ey+S5PkfAStatE2pml +91F0JfoyhJvbXHk1iusM9n0EoZly7J5fDvaQ3eYtzmrjV57WY3yPgX2ecZX4TPLd +C3mUBfdwFMBSXqLCYh5QQQ3cnEsrtIWyXY2PWI0XUJJqPfEquxQt06fbO6J02lAD +PPPkCSidsGlzV4C3MU/QG8PMTiwerM1GroD7EWfyxkuCnbET4oznnHkmr7XJnTU0 +BCDg8SfZvyxoSOY+K1CNpphT6bAWkXkcftdZB6oJ+HeCTbdWR8nP64Z57lAr1uLf +GgnImSzT/4N6/IeM +=d8Zd +-----END PGP PUBLIC KEY BLOCK----- diff --git a/config/archives/x2go.list.binary b/config/archives/x2go.list.binary new file mode 100644 index 0000000..e341022 --- /dev/null +++ b/config/archives/x2go.list.binary @@ -0,0 +1,2 @@ +#deb http://packages.x2go.org/debian jessie main +deb http://packages.x2go.org/debian jessie heuler -- 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
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 78cddb1dfa2869fc7e04e0c3d86f93812833f719 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 15:32:10 2017 +0100 removed nodm and openbox as they probably interfere with mate --- config/package-lists/desktop.list.chroot | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index bc2d8fc..05b736b 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -5,6 +5,4 @@ xserver-xorg-video-all xserver-xorg-video-geode xserver-xorg-video-qxl xserver-xorg -nodm -openbox xterm -- 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
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 c0562bd056d38179a0228fc09890cb44346bc7bb Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 01:03:21 2017 +0100 switched to heuler repo for x2gothinclient-minidesktop --- config/archives/x2go.list.chroot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/archives/x2go.list.chroot b/config/archives/x2go.list.chroot index 51c0819..e341022 100644 --- a/config/archives/x2go.list.chroot +++ b/config/archives/x2go.list.chroot @@ -1 +1,2 @@ -deb http://packages.x2go.org/debian jessie main +#deb http://packages.x2go.org/debian jessie main +deb http://packages.x2go.org/debian jessie heuler -- 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
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 558cb5ae0a43d8a02337939b3053c1645e38d035 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 01:05:45 2017 +0100 Added packages for MATE-Minidesktop --- config/package-lists/x2go.list.chroot | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index 06348e5..8e0fdff 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -1,4 +1,7 @@ cryptsetup +firefox-esr +firefox-esr-l10n-de +flashplugin-nonfree freerdp-x11 libfile-path-expand-perl libfreerdp-cache1.1 @@ -42,8 +45,8 @@ libxinerama1 libxkbfile1 libxrender1 libxv1 -x2goclient -x2gousbmount +x2gothinclient-minidesktop +x2gothinclient-usbmount pinentry-x2go pulseaudio pulseaudio-module-x11 -- 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
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 7d7a78024891d5ff2559c2b6a74ce4f7f0cc9cb5 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 11:13:25 2017 +0100 removed thinclient startup due to possible interference with minidesktop --- .../lib/live/config/2800-x2go-thinclientconfig | 154 --------------------- 1 file changed, 154 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig deleted file mode 100755 index 2bb146b..0000000 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/bash - -X2GoThinClientConfig () -{ - -# Output startup message -# -echo -n " x2go-thinclientconfig" - -# using xmlstarlet would mean wasting yet another Megabyte of space ... -# disable virtual desktops -sed -i -e 's#<number>4</number>#<number>1</number>#' /etc/xdg/openbox/rc.xml -# disable OpenBox context menu (would be accessible in xinerama) -sed -i -e '\#<action name="ShowMenu"><menu>[a-z-]*-menu</menu></action>#d' /etc/xdg/openbox/rc.xml -# make sure OpenBox maximizes X2GoClient on launch and hides window decorations -sed -i -e '\#<applications>#a<application title="X2Go Client" type="normal">' -e '\#<applications>#a<decor>no</decor>' -e '\#<applications>#a</application>' /etc/xdg/openbox/rc.xml - -cat >/home/user/.xsession <<XSESSION -# inspired by -# http://code.x2go.org/gitweb?p=x2gothinclient.git;a=blob_plain;f=displaymanag... -# check the above file for ideas before reinventing the wheel - -# Spawn PulseAudio -pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 & - -# additional variable instead of "case \$(...) in", as we need the value again later on -XRANDRCMDTAINTED=\$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '\$1 == "xinerama" { print \$2 }') - -# sanitize input -case \$XRANDRCMDTAINTED in -"above") - XRANDRCMD="above" - ;; -"below") - XRANDRCMD="below" - ;; -"same-as") - XRANDRCMD="same-as" - ;; -"right-of") - XRANDRCMD="right-of" - ;; -*) - XRANDRCMD="left-of" # default - ;; -esac - -# find out how many touch devices we have -TOUCHDEVICESCOUNT=\$(LANG=C xsetwacom --list devices | wc -l) - -# find out how many mouse devices we have -MICECOUNT=\$(find /dev/input -maxdepth 1 -name "mouse*" | wc -l) - -# loop through the following code block for all connected display devices -for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1); do - - #remove trailing newline from NEXT_DISPLAY - NEXT_DISPLAY=\${NEXT_DISPLAY%\$'\n'} - - # THIS_DISPLAY won't be defined until the second time the loop is executed, which is a - # neat way of running xrandr only if there are at least two connected display devices - if [ -n \${THIS_DISPLAY+x} ] ; then - - if [ \$TOUCHDEVICESCOUNT -gt 0 ] && [ \$MICECOUNT -lt 1 ] && [ -z \$XRANDRCMDTAINTED ]; then - # we have a touch device and no mice, and no xinerama parameter was set, - # so switch to clone view to make the touch device usable - /usr/bin/xrandr --output \$NEXT_DISPLAY --same-as \$THIS_DISPLAY - - else - # else use whatever is in XRANDRCMD (which is either our default of "left-of", - # or a valid xinerama kernel parameter value) - /usr/bin/xrandr --output \$NEXT_DISPLAY --\$XRANDRCMD \$THIS_DISPLAY - fi - - # now set THIS_DISPLAY -> every subsequent iteration of the loop will now enter the code block - # above where [ -n \${THIS_DISPLAY+x} ] is the conditional - THIS_DISPLAY=\$NEXT_DISPLAY - fi -done - -# Spawn openbox -openbox & - -# set screen background to X2Go default blue on all detected screens -xsetroot -solid "#246ed8" - -# Get X2GoConfig -BROKERURL=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^broker-url=/ { print \$2 }') -LDAP=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - sed 's/^ldap=/ldap#/' | \ - awk -F'#' ' /^ldap#/ { print \$2 }') -LDAP1=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - sed 's/^ldap1=/ldap1#/' | \ - awk -F'#' ' /^ldap1#/ { print \$2 }') -LDAP2=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - sed 's/^ldap2=/ldap2#/' | \ - awk -F'#' ' /^ldap2#/ { print \$2 }') - -# Spawn X2GoClient -if [ -n "\$BROKERURL" ]; then - SESSIONFROM="--broker-url=\$BROKERURL" -else - SESSIONFROM="--session-conf=/etc/x2go/x2gothinclient_sessions" -fi -if [ -n "\$LDAP" ] ; then - if [ -n "\$LDAP1" ] ; then - BACKUPLDAP="--ldap1=\$LDAP1" - if [ -n "\$LDAP2" ] ; then - BACKUPLDAP="\$BACKUPLDAP --ldap2=\$LDAP2" - fi - fi - LDAPPARAMS="--ldap=\$LDAP \$BACKUPLDAP" -else - LDAPPARAMS="" -fi - -BLANKINGTIME=\$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '\$1 == "blank" { print \$2 }') -if [ -n "\$BLANKINGTIME" ]; then - DPMSARR=(\$(echo \$BLANKINGTIME | awk -F ':' '\$1 ~/^[0-9]*\$/ && \$2 ~/^[0-9]*\$/ && \$3 ~/^[0-9]*\$/ { print \$1 " " \$2 " " \$3}')) - if [ \${DPMSARR[0]} -eq 0 ]; then - # Disable screensaver and DPMS Power Saving if requested - xset s off - if ! grep -q '\W*nodpms\W*' /proc/cmdline; then - xset -dpms - fi - else - xset s on - xset s \${DPMSARR[0]} - if ! grep -q '\W*nodpms\W*' /proc/cmdline; then - # Yes, "+dpms dpms" is intentional. - xset +dpms dpms \${DPMSARR[0]} \${DPMSARR[1]} \${DPMSARR[2]} - fi - fi -fi - -x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM -XSESSION - -chown user:user /home/user/.xsession -chmod 644 /home/user/.xsession - -# This is needed for File Sharing support (USB media and the like) -mkdir -p /home/user/{export,logins,mounts} -chown user:user /home/user/{export,logins,mounts} -chmod 700 /home/user/{export,logins,mounts} - -} - -X2GoThinClientConfig -- 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
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 77a83005d0316333fef267feb6c6877fa6d89d50 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 14:43:04 2017 +0200 more reliable way of determining that IP has been assigned --- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index e613d35..614fc40 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -17,7 +17,7 @@ GetSSHPubKeysFromServer () #!/bin/bash export TERM=linux; -while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do +while [ -z "$(hostname -I)" ] ; do sleep 2 done 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 2dd20da..6c892f5 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -15,7 +15,7 @@ echo -n " xserver-xorg-getxorgconf" #!/bin/bash export TERM=linux; -while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do +while [ -z "$(hostname -I)" ] ; do sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then -- 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
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 cce2ad72f413466e85e5451bc6b84ae5939321b7 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 14:41:42 2017 +0200 more reliable way of determining that IP has been assigned --- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 74524fc..c628283 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -15,7 +15,7 @@ X2GoGetSessions () #!/bin/bash export TERM=linux; -while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do +while [ -z "$(hostname -I)" ] ; do sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then -- 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
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 3a136f7e7b671ea324d4c69ddcf56c658a35ab37 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 17:24:56 2017 +0100 added file to inject thinclientmode into config --- .../030_x2gothinclient-inject-tcmode | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode new file mode 100755 index 0000000..b790254 --- /dev/null +++ b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright (C) 2010-2015 by X2Go project, http://wiki.x2go.org +# Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> +# Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de> +# Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + +# X2Go is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# X2Go is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +if [ -z "$X2GO_HANDLE_DAEMON" ] ; then + sed -i -e "\#^/usr/lib/x2go/x2goclient#a\\\t\\t\\t --thinclient \\\\" /etc/x2go/x2gothinclient-minidesktop_start +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
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 d592548a109c868c40036e66070dd3e481059b69 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 20:08:58 2017 +0100 Revert "removed packages not found in stretch" This reverts commit c9253c1df6e934d423106fd2da4a42fc6d2a045d. --- config/package-lists/live.list.chroot | 1 + config/package-lists/x2go.list.chroot | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/package-lists/live.list.chroot b/config/package-lists/live.list.chroot index 30fd30f..ca96ff1 100644 --- a/config/package-lists/live.list.chroot +++ b/config/package-lists/live.list.chroot @@ -1,6 +1,7 @@ console-setup console-setup-linux fuse +httpfs2 initramfs-tools kbd keyboard-configuration diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index 34c6914..8e0fdff 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -16,6 +16,7 @@ libfreerdp-primitives1.1 libfreerdp-rail1.1 libfreerdp-utils1.1 libjpeg62-turbo +libssl1.0.0 libwinpr-crt0.1 libwinpr-crypto0.1 libwinpr-dsparse0.1 @@ -48,6 +49,7 @@ x2gothinclient-minidesktop x2gothinclient-usbmount pinentry-x2go pulseaudio +pulseaudio-module-x11 pulseaudio-utils rdesktop udev -- 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
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 c9253c1df6e934d423106fd2da4a42fc6d2a045d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 19:23:00 2017 +0100 removed packages not found in stretch --- config/package-lists/live.list.chroot | 1 - config/package-lists/x2go.list.chroot | 2 -- 2 files changed, 3 deletions(-) diff --git a/config/package-lists/live.list.chroot b/config/package-lists/live.list.chroot index ca96ff1..30fd30f 100644 --- a/config/package-lists/live.list.chroot +++ b/config/package-lists/live.list.chroot @@ -1,7 +1,6 @@ console-setup console-setup-linux fuse -httpfs2 initramfs-tools kbd keyboard-configuration diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index 8e0fdff..34c6914 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -16,7 +16,6 @@ libfreerdp-primitives1.1 libfreerdp-rail1.1 libfreerdp-utils1.1 libjpeg62-turbo -libssl1.0.0 libwinpr-crt0.1 libwinpr-crypto0.1 libwinpr-dsparse0.1 @@ -49,7 +48,6 @@ x2gothinclient-minidesktop x2gothinclient-usbmount pinentry-x2go pulseaudio -pulseaudio-module-x11 pulseaudio-utils rdesktop udev -- 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
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 432e322bb2fcb4673a002345af00993bac52bed6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Feb 16 16:56:23 2017 +0100 add GPL header --- .../020_x2gothinclient-confine-to-tray | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray index 8c2d046..b8d3210 100755 --- a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray +++ b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray @@ -1,5 +1,25 @@ #!/bin/bash +# Copyright (C) 2010-2015 by X2Go project, http://wiki.x2go.org +# Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> +# Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de> +# Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + +# X2Go is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# X2Go is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + if [ -z "$X2GO_HANDLE_DAEMON" ] ; then mkdir -p ~x2gothinclient/.x2goclient echo '[trayicon]' >>~x2gothinclient/.x2goclient/settings -- 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
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 a05b7e5f1b125189061d5a19e3abda09169a0166 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 14:39:41 2017 +0200 more reliable way of determining that IP has been assigned --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 20896d4..b3e6f89 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -16,7 +16,7 @@ cat >/etc/network/if-up.d/showips <<SHOWIPS #!/bin/bash export TERM=linux; -while ! ip a | grep -v "inet 127.0.0.1" | grep -v "inet6 ::1/128" | grep -q inet ; do +while [ -z "$(hostname -I)" ] ; do sleep 2 done -- 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
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@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
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 6b2292c9b91504e61c5438ffc44dac4c11fb0fd0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 15:00:54 2017 +0200 make getsessions delete thinclient_sessions file if boot parameter was passed; make thinclientconfig wait for valid thinclient_sessions file unless broker mode is active --- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index a3c476c..a022684 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -10,6 +10,9 @@ X2GoGetSessions () tr ' ' '\n' | \ awk -F'=' ' /^sessionsurl=/ { print $2 }') if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then + # only mv this file if SESSIONSURL was set. If not, leave it in place - as + # it might have been customized at image creation time + mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new cat >/etc/network/if-up.d/getsessions <<GETSESS #!/bin/bash -- 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
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 a1dcfb3ab5d362face00bb3d332b861c2f8f2132 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 18:57:05 2017 +0200 we need to escape $0, as it will contain the name of the script generating the if-up.d script if we don't --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index d0521b5..ee4c1f2 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/000-showips <<SHOWIPS export TERM=linux; while [ -z "$(hostname -I)" ] ; do - echo "'$0' is waiting for a client IP." + echo "'\$0' is waiting for a client IP." sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index e3e7ebb..e8277dc 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "$(hostname -I)" ] ; do - echo "'$0' is waiting for a client IP." + echo "'\$0' is waiting for a client IP." sleep 2 done 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 d9dcf4e..1ec5870 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; while [ -z "$(hostname -I)" ] ; do - echo "'$0' is waiting for a client IP." + echo "'\$0' is waiting for a client IP." sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 4ae1562..7a90aca 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; while [ -z "$(hostname -I)" ] ; do - echo "'$0' is waiting for a client IP." + echo "'\$0' is waiting for a client IP." sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then -- 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
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 e3cbf8cc3b148cbf6ad7cc90f0b1897c810e0bd9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 14:47:31 2017 +0200 added output: when sleeping while waiting for an IP, print out which script is waiting. --- config/includes.chroot/lib/live/config/2000-showifconfig | 1 + config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 1 + config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 1 + config/includes.chroot/lib/live/config/2600-x2go-getsessions | 1 + 4 files changed, 4 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index b3e6f89..69d8e84 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,6 +17,7 @@ cat >/etc/network/if-up.d/showips <<SHOWIPS export TERM=linux; while [ -z "$(hostname -I)" ] ; do + echo "'$0' is waiting for a client IP." sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 614fc40..01ba31f 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,6 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "$(hostname -I)" ] ; do + echo "'$0' is waiting for a client IP." sleep 2 done 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 6c892f5..3fa2a29 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,6 +16,7 @@ echo -n " xserver-xorg-getxorgconf" 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 diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index c628283..a3c476c 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -16,6 +16,7 @@ X2GoGetSessions () 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 -- 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
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 40a67e49251b5bead20b21e4213aeb0b24d16554 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 17:44:37 2017 +0200 added numbers to if-up.d script file names so we can enforce the sequence of execution --- config/includes.chroot/lib/live/config/2000-showifconfig | 4 ++-- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 4 ++-- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 4 ++-- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 69d8e84..d0521b5 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -12,7 +12,7 @@ echo -n " showifconfig" # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else # Output the result on virtual terminal 9 -cat >/etc/network/if-up.d/showips <<SHOWIPS +cat >/etc/network/if-up.d/000-showips <<SHOWIPS #!/bin/bash export TERM=linux; @@ -33,7 +33,7 @@ echo "\$IPMSG" >> /etc/issue; echo "\$IPMSG" >> /etc/issue.net SHOWIPS -chmod 755 /etc/network/if-up.d/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 01ba31f..e3e7ebb 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -13,7 +13,7 @@ GetSSHPubKeysFromServer () awk -F'=' ' /^pubkey=/ { print $2 }') if [ -n "$PUBKEYURL" ] ; then - cat >/etc/network/if-up.d/getsshpubkeysfromserver <<GETPUBKEY + cat >/etc/network/if-up.d/010-getsshpubkeysfromserver <<GETPUBKEY #!/bin/bash export TERM=linux; @@ -46,7 +46,7 @@ else fi GETPUBKEY - chmod 755 /etc/network/if-up.d/getsshpubkeysfromserver + chmod 755 /etc/network/if-up.d/010-getsshpubkeysfromserver fi } 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 3fa2a29..d9dcf4e 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -11,7 +11,7 @@ echo -n " xserver-xorg-getxorgconf" awk -F'=' ' /^xorgconfurl=/ { print $2 }') if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then XORGCONFDESTINATION=/etc/X11/xorg.conf.new - cat >/etc/network/if-up.d/getxorgconf <<GETXORG + cat >/etc/network/if-up.d/020-getxorgconf <<GETXORG #!/bin/bash export TERM=linux; @@ -40,7 +40,7 @@ if [ -s $XORGCONFDESTINATION ] ; then fi GETXORG - chmod 755 /etc/network/if-up.d/getxorgconf + chmod 755 /etc/network/if-up.d/020-getxorgconf fi } XServerXorgGetXorgConf diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index a022684..4ae1562 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -14,7 +14,7 @@ X2GoGetSessions () # it might have been customized at image creation time mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new - cat >/etc/network/if-up.d/getsessions <<GETSESS + cat >/etc/network/if-up.d/030-getsessions <<GETSESS #!/bin/bash export TERM=linux; @@ -43,7 +43,7 @@ if [ -s $SESSIONSDESTINATION ] ; then fi GETSESS - chmod 755 /etc/network/if-up.d/getsessions + 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
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 61843895cb8d625f0a6d2fd3157e20b177b62a69 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 00:34:08 2017 +0200 added timestamps, switched log output to | tee -a /dev/tty9 like in the other scripts --- config/includes.chroot/lib/live/config/2500-tcpprint | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index 6026f44..68bbe5c 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -28,7 +28,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 -e "\nSetting up local printers ..." >>/dev/tty9 + echo -e "\n$(date +'%F | %T | ')Setting up local printers ..." | tee -a /dev/tty9 # Create a listening port for a TCP/9100-RAW-printer # @@ -52,21 +52,21 @@ service jetdirect${PRINTERCOUNT} $TCPPRINTONLYFROM } JETDIRCONF - echo "Mapping $PRINTERDEV => $PORTNUMBER" >>/dev/tty9 + echo "$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 PRINTERCOUNT=$((PRINTERCOUNT+1)) done echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect if ps -C xinetd --no-header >/dev/null ; then - echo -n "xinetd needs to be restarted, trying to do that ..." >>/dev/tty9 + echo -n "$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty9 if /etc/init.d/xinetd restart; then - echo -n " success. All done." >>/dev/tty9 + echo -n " success. All done." | tee -a /dev/tty9 else - echo -n " error." >>/dev/tty9 + echo -n " error." | tee -a /dev/tty9 fi else - echo -n "No xinetd restart necessary. All done." >>/dev/tty9 + echo -n "$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 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
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 26ebea55683bfb2ed6d04bddf6e27edbe8a42dc9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 21:51:28 2017 +0200 fixes missing escape -> hostname -I was never executed --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 4c9169c..5ae4a1e 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/000-showips <<SHOWIPS export TERM=linux; ( - while [ -z "$(hostname -I)" ] ; do + while [ -z "\$(hostname -I)" ] ; do echo "'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index c1f5dc4..d73dcf1 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; ( - while [ -z "$(hostname -I)" ] ; do + while [ -z "\$(hostname -I)" ] ; do echo "'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done 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 fb9f7ea..e474167 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; ( - while [ -z "$(hostname -I)" ] ; do + while [ -z "\$(hostname -I)" ] ; do echo "'\$0' is waiting for a client IP." sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 8163cf6..aa00f3a 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; ( - while [ -z "$(hostname -I)" ] ; do + while [ -z "\$(hostname -I)" ] ; do echo "'\$0' is waiting for a client IP." sleep 2 done -- 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
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 3d0d6ef5d7b0b96aaabcdc1982ab046d6036bdd9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 21:56:56 2017 +0200 changed script numbering to four-digit, beginning with 0100 --- config/includes.chroot/lib/live/config/2000-showifconfig | 4 ++-- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 4 ++-- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 4 ++-- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index f227384..f1b8236 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -12,7 +12,7 @@ echo -n " showifconfig" # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else # Output the result on virtual terminal 9 -cat >/etc/network/if-up.d/000-showips <<SHOWIPS +cat >/etc/network/if-up.d/0100-showips <<SHOWIPS #!/bin/bash export TERM=linux; @@ -33,7 +33,7 @@ echo "\$IPMSG" >> /etc/issue; echo "\$IPMSG" >> /etc/issue.net SHOWIPS -chmod 755 /etc/network/if-up.d/000-showips +chmod 755 /etc/network/if-up.d/0100-showips } diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 16616f6..f2ab3b3 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -13,7 +13,7 @@ GetSSHPubKeysFromServer () awk -F'=' ' /^pubkey=/ { print $2 }') if [ -n "$PUBKEYURL" ] ; then - cat >/etc/network/if-up.d/010-getsshpubkeysfromserver <<GETPUBKEY + cat >/etc/network/if-up.d/0200-getsshpubkeysfromserver <<GETPUBKEY #!/bin/bash export TERM=linux; @@ -46,7 +46,7 @@ else fi GETPUBKEY - chmod 755 /etc/network/if-up.d/010-getsshpubkeysfromserver + chmod 755 /etc/network/if-up.d/0200-getsshpubkeysfromserver fi } 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 bfd8d69..94bc31a 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -11,7 +11,7 @@ echo -n " xserver-xorg-getxorgconf" awk -F'=' ' /^xorgconfurl=/ { print $2 }') if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then XORGCONFDESTINATION=/etc/X11/xorg.conf.new - cat >/etc/network/if-up.d/020-getxorgconf <<GETXORG + cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG #!/bin/bash export TERM=linux; @@ -39,7 +39,7 @@ if [ -s $XORGCONFDESTINATION ] ; then mv $XORGCONFDESTINATION /etc/X11/xorg.conf fi GETXORG - chmod 755 /etc/network/if-up.d/020-getxorgconf + chmod 755 /etc/network/if-up.d/0300-getxorgconf fi } XServerXorgGetXorgConf diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 2ff8d2b..6e63262 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -14,7 +14,7 @@ X2GoGetSessions () # it might have been customized at image creation time mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new - cat >/etc/network/if-up.d/030-getsessions <<GETSESS + cat >/etc/network/if-up.d/0400-getsessions <<GETSESS #!/bin/bash export TERM=linux; @@ -42,7 +42,7 @@ if [ -s $SESSIONSDESTINATION ] ; then mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions fi GETSESS - chmod 755 /etc/network/if-up.d/030-getsessions + chmod 755 /etc/network/if-up.d/0400-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
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 f00b6656ebce133b7d3e7513ebe6f72b5bea2d47 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 21:55:08 2017 +0200 un-did backgrounding --- .../lib/live/config/2000-showifconfig | 32 +++++++-------- .../lib/live/config/2150-getsshpubkeysfromserver | 48 +++++++++++----------- .../lib/live/config/2200-xserver-xorg-getxorgconf | 40 +++++++++--------- .../lib/live/config/2600-x2go-getsessions | 40 +++++++++--------- 4 files changed, 76 insertions(+), 84 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 5ae4a1e..f227384 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -16,23 +16,21 @@ 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." | 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 -) & +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 217ce24..16616f6 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -17,35 +17,33 @@ GetSSHPubKeysFromServer () #!/bin/bash export TERM=linux; -( - 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 "$PUBKEYURL" | 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 +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 "$PUBKEYURL" | 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 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 e474167..bfd8d69 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -15,31 +15,29 @@ 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 +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 + 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 -) & +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 aa00f3a..2ff8d2b 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -18,31 +18,29 @@ 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 +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 + 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 -) & +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
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 6d12eeee472ca9280e58ae709eea07b7bc94981e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 00:29:13 2017 +0200 added timestamps to log output, fixed log output in 2200 and 2600 --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index f1b8236..99ddb60 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index f2ab3b3..511a8a4 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done 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 94bc31a..8ae3472 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "'\$0' is waiting for a client IP." + echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 6e63262..3d2f623 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "'\$0' is waiting for a client IP." + echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then -- 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
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 b247ec4c1a07ba831541f8d3e51cc9dbb89e29ad Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Jul 21 21:53:40 2017 +0200 Variable name was wrong in one place --- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index d73dcf1..217ce24 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -30,7 +30,7 @@ export TERM=linux; touch /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys - if echo "$PUBKEY" | grep -q "^tftp://" ; then + if echo "$PUBKEYURL" | grep -q "^tftp://" ; then PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) if [ -n "$PUBKEYSERVER" ] && [ -n "$PUBKEYPATH" ] ; then -- 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
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 806926d5489d8f93f9e21c1d5ddb5fa0e40c2880 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 11:53:55 2017 +0200 improved log output --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- .../includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- .../includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2500-tcpprint | 8 ++++---- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index e42ccf4..faa5918 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -n "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 382a797..3070fa2 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -n "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done 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 0bb16a7..4955f7b 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -n "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index a7cb327..c22e235 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -28,7 +28,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 -e "\n\$(date +'%F | %T | ')Setting up local printers ..." | tee -a /dev/tty9 + echo -en "\\n\$(date +'%F | %T | ')Setting up local printers ..." | tee -a /dev/tty9 # Create a listening port for a TCP/9100-RAW-printer # @@ -52,21 +52,21 @@ service jetdirect${PRINTERCOUNT} $TCPPRINTONLYFROM } JETDIRCONF - echo "\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 + echo -en "\\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 PRINTERCOUNT=$((PRINTERCOUNT+1)) done echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect if ps -C xinetd --no-header >/dev/null ; then - echo -n "\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty9 + echo -en "\\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty9 if /etc/init.d/xinetd restart; then echo -n " success. All done." | tee -a /dev/tty9 else echo -n " error." | tee -a /dev/tty9 fi else - echo -n "\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 + echo -en "\\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 fi ) & diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index f0a7848..da0135b 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then @@ -27,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 "Waiting for session config data ..." + echo -en "\\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty9 sleep 5 done fi else while ! wget -q -O $SESSIONSDESTINATION $SESSIONSURL ; do - echo "Waiting for session config data ..." + echo -en "\\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty9 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
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 9d3dcf17b94a13e5b40b48b62196c5a1db5a5d94 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 12:39:17 2017 +0200 last commit was incomplete, and included one escape too much per echo --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- .../includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- .../includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2500-tcpprint | 8 ++++---- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index faa5918..0f96fdf 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -n "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 3070fa2..0042e3d 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -n "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done 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 4955f7b..31587c5 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -n "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index c22e235..477a53d 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -28,7 +28,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 | ')Setting up local printers ..." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')Setting up local printers ..." | tee -a /dev/tty9 # Create a listening port for a TCP/9100-RAW-printer # @@ -52,21 +52,21 @@ service jetdirect${PRINTERCOUNT} $TCPPRINTONLYFROM } JETDIRCONF - echo -en "\\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 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/tty9 + echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty9 if /etc/init.d/xinetd restart; then echo -n " success. All done." | tee -a /dev/tty9 else echo -n " error." | tee -a /dev/tty9 fi else - echo -en "\\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 fi ) & diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index da0135b..3af8c22 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -en "\\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then -- 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
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 6cec70978a3f133cb456bd5ee5db300d2360b06d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 13:10:22 2017 +0200 and again, missing escapes --- config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 0042e3d..22dc9fd 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -32,7 +32,7 @@ chmod 600 /root/.ssh/authorized_keys if echo "$PUBKEYURL" | grep -q "^tftp://" ; then PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) - if [ -n "$PUBKEYSERVER" ] && [ -n "$PUBKEYPATH" ] ; then + 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 -- 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
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 b46dffb74b70b1366f88c04029e5d7e69662bcea Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 01:29:23 2017 +0200 escape sign wass missingonce again ... --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- .../includes.chroot/lib/live/config/2150-getsshpubkeysfromserver | 2 +- .../includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2500-tcpprint | 8 ++++---- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 99ddb60..e42ccf4 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 511a8a4..382a797 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done 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 8ae3472..0bb16a7 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index 68bbe5c..a7cb327 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -28,7 +28,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 -e "\n$(date +'%F | %T | ')Setting up local printers ..." | tee -a /dev/tty9 + echo -e "\n\$(date +'%F | %T | ')Setting up local printers ..." | tee -a /dev/tty9 # Create a listening port for a TCP/9100-RAW-printer # @@ -52,21 +52,21 @@ service jetdirect${PRINTERCOUNT} $TCPPRINTONLYFROM } JETDIRCONF - echo "$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 + echo "\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 PRINTERCOUNT=$((PRINTERCOUNT+1)) done echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect if ps -C xinetd --no-header >/dev/null ; then - echo -n "$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty9 + echo -n "\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty9 if /etc/init.d/xinetd restart; then echo -n " success. All done." | tee -a /dev/tty9 else echo -n " error." | tee -a /dev/tty9 fi else - echo -n "$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 + echo -n "\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 fi ) & diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 3d2f623..f0a7848 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo "$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo "\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then -- 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
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 7cc852af668b2120623b036461bd5bbd620184d8 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 01:19:47 2017 +0200 tty9 -> tty(first unused VT) --- config/includes.chroot/lib/live/config/2000-showifconfig | 2 +- .../lib/live/config/2150-getsshpubkeysfromserver | 2 +- .../lib/live/config/2200-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2500-tcpprint | 12 ++++++------ config/includes.chroot/lib/live/config/2600-x2go-getsessions | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 0f96fdf..6ebb066 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -17,7 +17,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) sleep 2 done diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver index 22dc9fd..21f0c31 100755 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver @@ -18,7 +18,7 @@ GetSSHPubKeysFromServer () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) sleep 2 done 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 e89a565..06794b1 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -16,7 +16,7 @@ echo -n " xserver-xorg-getxorgconf" export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) sleep 2 done if echo "$XORGCONFURL" | grep -q "^tftp://" ; then diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint index 477a53d..2bb453b 100755 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ b/config/includes.chroot/lib/live/config/2500-tcpprint @@ -28,7 +28,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 | ')Setting up local printers ..." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) # Create a listening port for a TCP/9100-RAW-printer # @@ -52,21 +52,21 @@ service jetdirect${PRINTERCOUNT} $TCPPRINTONLYFROM } JETDIRCONF - echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(fgconsole -n) 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/tty9 + echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty\$(fgconsole -n) if /etc/init.d/xinetd restart; then - echo -n " success. All done." | tee -a /dev/tty9 + echo -n " success. All done." | tee -a /dev/tty\$(fgconsole -n) else - echo -n " error." | tee -a /dev/tty9 + echo -n " error." | tee -a /dev/tty\$(fgconsole -n) fi else - echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(fgconsole -n) fi ) & diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 7e633ac..eff3073 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -19,7 +19,7 @@ X2GoGetSessions () export TERM=linux; while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty9 + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) sleep 2 done if echo "$SESSIONSURL" | grep -q "^tftp://" ; then @@ -27,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/tty9 + echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(fgconsole -n) 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/tty9 + echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(fgconsole -n) 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
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 c2c29f862edbc4787b5dd63e4ea34705f96ed57a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 01:22:16 2017 +0200 removed old commented-out code --- config/includes.chroot/lib/live/config/2000-showifconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 6ebb066..77fd1ce 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -7,7 +7,6 @@ ShowIFConfig () # echo -n " showifconfig" -#setterm -term linux -r >/dev/tty9 # Make sure no language-specific stuff interferes with our matching # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else -- 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
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 3f921db4cd0ff306912e3518552f7efbeb8035b0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 13:14:00 2017 +0200 more superfluous escapes removed --- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index e63d06a..7e633ac 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -27,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/tty9 + echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty9 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/tty9 + echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty9 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
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 f7daef7dd76b4dc655b504ce76b0ca04c500efd3 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 13:13:11 2017 +0200 more missing escapes --- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 4 ++-- config/includes.chroot/lib/live/config/2600-x2go-getsessions | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 a36fc1f..e89a565 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -22,8 +22,8 @@ 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 + if [ -n "\$XORGCONFSERVER" ] && [ -n "\$XORGCONFPATH" ] ; then + while ! atftp \$XORGCONFSERVER -g -r \$XORGCONFPATH -l $XORGCONFDESTINATION ; do echo "Waiting for xorg.conf download ..." sleep 5 done diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions index 3af8c22..e63d06a 100755 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2600-x2go-getsessions @@ -25,8 +25,8 @@ 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 + 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/tty9 sleep 5 done -- 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
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 42fbebc5664773fd0e200ddc055373bd282c0d02 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Jul 22 13:10:51 2017 +0200 indentation was wrong --- config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 31587c5..a36fc1f 100755 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf @@ -10,8 +10,8 @@ echo -n " xserver-xorg-getxorgconf" tr ' ' '\n' | \ awk -F'=' ' /^xorgconfurl=/ { print $2 }') if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then - XORGCONFDESTINATION=/etc/X11/xorg.conf.new - cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG + XORGCONFDESTINATION=/etc/X11/xorg.conf.new + cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG #!/bin/bash export TERM=linux; -- 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
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 84672e45d0b20640b5ad4c5eba0245e13b40a5a8 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 01:33:35 2017 +0200 switched liveupdate to tty(next-available-VT) logging and timestamped output --- .../lib/live/config/2300-live-autoupdate | 94 +++++++++++----------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 8b351fd..6af3b8d 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -35,13 +35,13 @@ echo -n " live-autoupdater (backgrounding update task)" ( # wait until terminal is available -while ! [ -c /dev/tty10 ] ; do +while ! [ -c /dev/tty$(fgconsole -n) ] ; do sleep 10 done -# redirect all output to console #10 +# redirect all output to first available VT console # -exec >/dev/tty10 2>&1 +exec >/dev/tty$(fgconsole -n) 2>&1 # clear console @@ -62,7 +62,7 @@ DOWNLOADURL=$(cat /proc/cmdline | \ awk -F'=' ' /^updateurl=/ { print $2 }') if [ -z "$DOWNLOADURL" ]; then - echo "No update URL. Exiting." + echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting." return 0 fi @@ -74,7 +74,7 @@ BWLIMITPERCENT=$(cat /proc/cmdline | \ awk -F'=' ' /^bwlimit=/ { print $2 }') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 - echo "Bandwidth limit not set. Defaulting to 20%." + echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%." fi @@ -88,7 +88,7 @@ if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then MAXSLEEPTIME=900 fi SLEEPTIME=0 -echo "Calculating random update delay (120-$MAXSLEEPTIME seconds)..." +echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." # During startup, script is run with /bin/sh, # even when #!/bin/bash is set, # so we need to improvise. @@ -97,7 +97,7 @@ SLEEPTIME=$((RND%MAXSLEEPTIME)) if [ $SLEEPTIME -lt 120 ]; then SLEEPTIME=$((SLEEPTIME+120)) fi -echo "Sleeping for $SLEEPTIME seconds ..." +echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..." sleep $SLEEPTIME @@ -116,9 +116,9 @@ if [ -n "$NTFSROOT" ]; then fi if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo "Mounted '/dev/disk/by-uuid/$NTFSROOT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." else - echo "Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." fi # TODO: Further error handling MOUNTPOINT="/lib/live/mount/ntfsroot/" @@ -139,7 +139,7 @@ if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ ) \ ); then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "No directories suitable for update." + echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update." return 0 # directories missing, most likely not a writeable medium fi @@ -158,7 +158,7 @@ elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then GRUBPATH="$MOUNTPOINT/boot/grub/" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "No suitable bootloader found." + echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found." return 1 fi @@ -174,7 +174,7 @@ elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then OTHERSYSTEMNAME="X2Go-live1" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Unable to determine path/name of running system." + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system." return 1 fi OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") @@ -188,9 +188,9 @@ DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") # like CF cards) # while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo "Sleeping 30 seconds ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." sleep 30 - echo "Retrying ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." done @@ -210,7 +210,7 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -n "Not enough Bandwidth for update task - " + [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -228,7 +228,7 @@ if echo "$DOWNLOADURL" | grep -q "^http" || \ awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo "Determined bandwidth limit: '$BWLIMIT KB/s'" + echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" @@ -244,7 +244,7 @@ elif echo "$DOWNLOADURL" | grep -q "^rsync"; then ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -n "Not enough Bandwidth for update task - " + [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -261,12 +261,12 @@ elif echo "$DOWNLOADURL" | grep -q "^rsync"; then awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo "Determined bandwidth limit: '$BWLIMIT KB/s'" + echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ $TEMPDIR" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Unsupported download mechanism." + echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting." return 1 fi rm /tmp/dl.log @@ -275,25 +275,25 @@ rm /tmp/dl.log # Proceed to download from update location # while ! $DOWNLOADCOMMAND; do - echo "Sleeping 30 seconds ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." sleep 30 - echo "Retrying ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." done # Now check if these files are different from what we already have in our # download directory on the boot medium # -echo "Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." +echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." if diff -q $DOWNLOADPATH $TEMPDIR \ >/dev/null then cleanup - echo "Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium else - echo "Differences detected. Continuing ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..." fi @@ -301,9 +301,9 @@ fi # remount it rw and async for speed # if mount -oremount,rw,async $MOUNTPOINT; then - echo "Remounted '$MOUNTPOINT' as rw and async." + echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async." else - echo "Could not remount '$MOUNTPOINT' as rw and async." + echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async." fi @@ -314,26 +314,26 @@ rm -f $TEMPDIR/index.ht* # move everything over to the boot medium # -echo "Moving $TEMPDIR/* => $DOWNLOADPATH" +echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH" mv $TEMPDIR/* $DOWNLOADPATH cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? if [ -n "$NTFSROOT" ]; then - echo "NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo "Mount successful." + echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful." else - echo "Failed to mount NTFSROOT." + echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT." fi fi # let's check if we just downloaded a copy of our running system # -echo "Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" +echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ [ -d "$OTHERSYSTEMFULLPATH" ] ; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Nothing to do. Content of $DOWNLOADPATH equals" \ + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \ "$RUNNINGSYSTEMNAME." return 0 # current is newest, nothing to do, # we want to keep the old system in OTHERSYSTEMFULLPATH @@ -348,20 +348,20 @@ mkdir -p $OTHERSYSTEMFULLPATH # let's check if our destination is already up to date or needs updating # -echo "Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" +echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "Nothing to do - content of '$DOWNLOADPATH' equals"\ + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ "'$OTHERSYSTEMNAME'." return 0 # OTHERSYSTEMFULLPATH is already up to date else # keep rsyncing until the update is complete - echo "Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH do - echo "Sleeping 30 seconds ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." sleep 30 - echo "Retrying ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." done fi @@ -369,7 +369,7 @@ fi # change default boot to the image we just downloaded and installed # if [ -n "$SYSLINUXPATH" ]; then - echo "Changing syslinux default to $OTHERSYSTEMNAME." + echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME." sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ $SYSLINUXPATH/syslinux.cfg @@ -385,16 +385,16 @@ elif [ -n "$GRUBPATH" ]; then awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo "Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ $MENULST else - echo "Not changing GRUB-legacy default." - echo "Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo "while default is set to position '$CURRENTDEFAULT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default." + echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'." fi else - echo "Unsupported bootloader." + echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader." fi # we're on an async mount point, so let's sync to be safe @@ -413,15 +413,15 @@ fi # if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then - echo "Unmounted '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." else - echo "Unable to unmount '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'." fi else if mount -oremount,ro,sync $MOUNTPOINT; then - echo "Remounted '$MOUNTPOINT' ro and sync." + echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync." else - echo "Unable to remount '$MOUNTPOINT' ro and sync." + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync." fi 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
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 5ac825644ceca7d2cedf3b0babe8f441d1817462 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 14:54:33 2017 +0200 first attempt at making all if-up scripts wait until an unused VT is available for log output --- .../lib/live/config/2000-waitforvts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts new file mode 100755 index 0000000..8d558e6 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2000-waitforvts @@ -0,0 +1,24 @@ +#!/bin/bash + +WaitForVTs () +{ + +# Output startup message +# +echo -n " waitforvts" + +cat >/etc/network/if-up.d/0000-waitforvts <<SHOWIPS +#!/bin/bash +export TERM=linux; + +# wait until terminal is available +while ! [ -c /dev/tty$(fgconsole -n) ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for an unused VT to become available." + sleep 2 +done + +chmod 755 /etc/network/if-up.d/0000-waitforvts + +} + +WaitForVTs -- 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
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 dcea49d7430f8667df614fbc0f05a8301815fcd1 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 13:09:23 2017 +0200 moved "wait until unused VT becomes available" from 2300 to 2000 --- config/includes.chroot/lib/live/config/2000-showifconfig | 5 +++++ config/includes.chroot/lib/live/config/2300-live-autoupdate | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 24268ac..9467e47 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -7,6 +7,11 @@ ShowIFConfig () # echo -n " showifconfig" +# wait until terminal is available +while ! [ -c /dev/tty$(fgconsole -n) ] ; do + sleep 10 +done + # Make sure no language-specific stuff interferes with our matching # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index d09130d..7e88812 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -34,11 +34,6 @@ echo -n " live-autoupdater (backgrounding update task)" # ( -# wait until terminal is available -while ! [ -c /dev/tty$(fgconsole -n) ] ; do - sleep 10 -done - # redirect all output to first available VT console # exec >/dev/tty$(fgconsole -n) 2>&1 -- 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
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 ee8d2a49acdb111694e6ccc7abf1c2124f840cba Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 13:08:20 2017 +0200 removed wrong comment --- config/includes.chroot/lib/live/config/2000-showifconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig index 77fd1ce..24268ac 100755 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ b/config/includes.chroot/lib/live/config/2000-showifconfig @@ -10,7 +10,6 @@ echo -n " showifconfig" # Make sure no language-specific stuff interferes with our matching # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else -# Output the result on virtual terminal 9 cat >/etc/network/if-up.d/0100-showips <<SHOWIPS #!/bin/bash export TERM=linux; -- 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
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 48907e5d62a0e0375b886bbfe5d9af48dd0b414d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 10:26:08 2017 +0200 some log output was still lacking the timestamp --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 6af3b8d..0639616 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -3,22 +3,22 @@ cleanup () { # discard contents of tmpfs, umount if necessary if [ -n "$NTFSROOT" ]; then - echo "Removing '$TEMPDIR/*'." + echo -en "\n$(date +'%F | %T | ')'\$0': Removing '$TEMPDIR/*'." rm -rf $TEMPDIR/* else - echo "Unmounting '$TEMPDIR'." + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounting '$TEMPDIR'." umount $TEMPDIR fi if rmdir $TEMPDIR; then - echo "Removed empty directory '$TEMPDIR'." + echo -en "\n$(date +'%F | %T | ')'\$0': Removed empty directory '$TEMPDIR'." else - echo "Could not remove directory '$TEMPDIR'." + echo -en "\n$(date +'%F | %T | ')'\$0': Could not remove directory '$TEMPDIR'." fi if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then - echo "Unmounted '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." else - echo "Could not unmount '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Could not unmount '$MOUNTPOINT'." fi 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
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 f47395469335b44d6183b4699c87973a3982f331 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 14:46:36 2017 +0200 renamed files; delete old names from git --- .../lib/live/config/2000-showifconfig | 43 -- .../includes.chroot/lib/live/config/2100-lockuser | 20 - .../lib/live/config/2150-getsshpubkeysfromserver | 55 --- .../lib/live/config/2200-xserver-xorg-getxorgconf | 45 --- .../lib/live/config/2300-live-autoupdate | 439 --------------------- .../live/config/2400-x2go-getportableappsessions | 23 -- .../config/2410-x2go-getopensshportableclientkey | 46 --- .../includes.chroot/lib/live/config/2500-tcpprint | 76 ---- .../lib/live/config/2600-x2go-getsessions | 49 --- 9 files changed, 796 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig deleted file mode 100755 index 9467e47..0000000 --- a/config/includes.chroot/lib/live/config/2000-showifconfig +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -ShowIFConfig () -{ - -# Output startup message -# -echo -n " showifconfig" - -# wait until terminal is available -while ! [ -c /dev/tty$(fgconsole -n) ] ; do - sleep 10 -done - -# Make sure no language-specific stuff interferes with our matching -# grep: highlight everything that matches "inet" to the end of its line -# and also (-E, |$) show every line that has an end => Everything else -cat >/etc/network/if-up.d/0100-showips <<SHOWIPS -#!/bin/bash -export TERM=linux; - -while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) - 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/0100-showips - -} - -ShowIFConfig diff --git a/config/includes.chroot/lib/live/config/2100-lockuser b/config/includes.chroot/lib/live/config/2100-lockuser deleted file mode 100755 index 1cbcc15..0000000 --- a/config/includes.chroot/lib/live/config/2100-lockuser +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -LockUser () -{ - -# Output startup message -# -echo -n " lockuser" - - -# Set password -# -if grep -q "\W*nouser\W*" /proc/cmdline ; then - passwd -l user >/dev/null -fi - -} - -LockUser - diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver deleted file mode 100755 index 21f0c31..0000000 --- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -GetSSHPubKeysFromServer () -{ - - # Output startup message - # - echo -n " getsshpubkeysfromserver" - - - PUBKEYURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^pubkey=/ { print $2 }') - - if [ -n "$PUBKEYURL" ] ; then - cat >/etc/network/if-up.d/0200-getsshpubkeysfromserver <<GETPUBKEY -#!/bin/bash -export TERM=linux; - -while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) - 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 "$PUBKEYURL" | 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 -GETPUBKEY - - chmod 755 /etc/network/if-up.d/0200-getsshpubkeysfromserver - fi - -} - -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 deleted file mode 100755 index 06794b1..0000000 --- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -XServerXorgGetXorgConf () -{ -# Output startup message -# -echo -n " xserver-xorg-getxorgconf" - - XORGCONFURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^xorgconfurl=/ { print $2 }') - if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then - XORGCONFDESTINATION=/etc/X11/xorg.conf.new - cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG -#!/bin/bash -export TERM=linux; - -while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) - 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/0300-getxorgconf - fi -} -XServerXorgGetXorgConf diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate deleted file mode 100755 index 7e88812..0000000 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ /dev/null @@ -1,439 +0,0 @@ -#!/bin/sh - -cleanup () -{ # discard contents of tmpfs, umount if necessary - if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Removing '$TEMPDIR/*'." - rm -rf $TEMPDIR/* - else - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounting '$TEMPDIR'." - umount $TEMPDIR - fi - if rmdir $TEMPDIR; then - echo -en "\n$(date +'%F | %T | ')'\$0': Removed empty directory '$TEMPDIR'." - else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not remove directory '$TEMPDIR'." - fi - if [ -n "$NTFSROOT" ]; then - if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." - else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not unmount '$MOUNTPOINT'." - fi - fi -} - -LiveAutoUpdateMain () -{ -# Output startup message -# -echo -n " live-autoupdater (backgrounding update task)" - - -# Background everything -# -( - -# redirect all output to first available VT console -# -exec >/dev/tty$(fgconsole -n) 2>&1 - - -# clear console -# -clear - - -# This is so grep, awk and sed will match the right terms regardless of LANG -# -unset LANG -unset LC_ALL -unset LC_MESSAGES - - -# download url pointing to directory with all required files goes here -DOWNLOADURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^updateurl=/ { print $2 }') - -if [ -z "$DOWNLOADURL" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting." - return 0 -fi - -# Bandwidth limit goes here -# -#BWLIMITPERCENT=20 # in percent, numeric-only -BWLIMITPERCENT=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^bwlimit=/ { print $2 }') -if [ -z "$BWLIMITPERCENT" ]; then - BWLIMITPERCENT=20 - echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%." -fi - - - -# sleeping a random amount of time to ease load on the update server -# -MAXSLEEPTIME=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') -if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then - MAXSLEEPTIME=900 -fi -SLEEPTIME=0 -echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." -# During startup, script is run with /bin/sh, -# even when #!/bin/bash is set, -# so we need to improvise. -RND=$(/bin/bash -c 'echo $RANDOM') -SLEEPTIME=$((RND%MAXSLEEPTIME)) -if [ $SLEEPTIME -lt 120 ]; then - SLEEPTIME=$((SLEEPTIME+120)) -fi -echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..." -sleep $SLEEPTIME - - -# Define our mountpoint and check if we're capable of auto-updating -NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') -if [ -n "$NTFSROOT" ]; then - mkdir -p /lib/live/mount/ntfsroot - # This is in case we've been passed an incomplete UUID and/or one with dashes - # For example, "vol c:" on Windows will return the last 8 digits of the UUID - # only, and separate them with a dash. - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(echo $NTFSROOT | tr -d '-') - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) - fi - fi - - if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." - else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." - fi - # TODO: Further error handling - MOUNTPOINT="/lib/live/mount/ntfsroot/" - # create a temporary directory - TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) -else - MOUNTPOINT="/lib/live/mount/findiso/" - # create a temporary directory and mount a tmpfs there - TEMPDIR=$(mktemp -d --tmpdir=/mnt) - - if [ -d /lib/live/mount/findiso/ ] ; then - # if we have access to the entire filesystem, use the - # directory size as base size for the current image - - # and if the download directory is even bigger, use that size - IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))") - IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download") - [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD - else - IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') - fi - # multiply current size by 1.5 as safety margin - mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR - -fi -if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ - ( \ - [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ - [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ - ) \ - ); then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update." - return 0 # directories missing, most likely not a writeable medium -fi - - -# define and figure out some paths that we will be needing later on -# -if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then - SYSLINUXPATH="$MOUNTPOINT/" -elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then - SYSLINUXPATH="$MOUNTPOINT/syslinux/" -elif [ -f "$MOUNTPOINT/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/" -elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/grub/" -elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/boot/grub/" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found." - return 1 -fi - -RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^findiso=/ { print $2 }')")) - -ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) -RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) -if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then - OTHERSYSTEMNAME="X2Go-live2" -elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then - OTHERSYSTEMNAME="X2Go-live1" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system." - return 1 -fi -OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") -DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") - - -# Now we'll copy the content of the X2Go-live-download folder to our tempdir -# this is so we can run wget in update mode (-N) or rsync without needing -# write access to our boot medium (write access means increased wear and tear, -# and we want to avoid that especially for media that has no wear-leveling -# like CF cards) -# -while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." - sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." -done - - -# Now let's figure out if we're supposed to use wget or rsync for downloading -# -if echo "$DOWNLOADURL" | grep -q "^http" || \ - echo "$DOWNLOADURL" | grep -q "^ftp" - then - # Attempt to determine available bandwidth & to set BWLIMIT accordingly - wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img - cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" - rm "/tmp/x2go-tce-initrd.img" - SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ - $7 == "-" { print $5 }' /tmp/dl.log | \ - tail -1 \ - ) - case $SIZEFACTORSTRING in - "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " - echo -n "aborting." - cleanup - return 0 - ;; - "KB/s") SIZEFACTOR=1;; - "MB/s") SIZEFACTOR=1024;; - "GB/s") SIZEFACTOR=1048576;; - *) SIZEFACTOR=$((1024*1024*1024));; - esac - DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ - { print $4 }' /tmp/dl.log | \ - tail -1 - ) - BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ - awk ' { print $1*$2*$3/100 }' | \ - awk -F'.' '{ print $1 }' \ - ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" - DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ - --progress=bar:force \ - --limit-rate=${BWLIMIT}k $DOWNLOADURL" - -elif echo "$DOWNLOADURL" | grep -q "^rsync"; then - - rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ - $TEMPDIR/x2go-tce-initrd.img.new - mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img - SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ - awk '$4 == "sent" && $12 == "bytes/sec" \ - { print $11 }' \ - ) - case $SIZEFACTORSTRING in - "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " - echo -n "aborting." - cleanup - return 0 - ;; - "K") SIZEFACTOR=1;; - "M") SIZEFACTOR=1024;; - "G") SIZEFACTOR=$((1024*1024));; - *) SIZEFACTOR=$((1024*1024*1024));; - esac - DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ - awk '$4 == "sent" && $12 == "bytes/sec" \ - { print $10 }') - BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ - awk ' { print $1*$2*$3/100 }' | \ - awk -F'.' '{ print $1 }' \ - ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" - DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ - $TEMPDIR" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting." - return 1 -fi -rm /tmp/dl.log - - -# Proceed to download from update location -# -while ! $DOWNLOADCOMMAND; do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." - sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." -done - -# Now check if these files are different from what we already have in our -# download directory on the boot medium -# -echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." -if diff -q $DOWNLOADPATH $TEMPDIR \ - >/dev/null - - then - cleanup - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." - return 0 # current is newest, nothing to do, we want to avoid - # unneccessary writes to the medium -else - echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..." -fi - - -# If we made it past that point, it's time to update the boot medium, so let's -# remount it rw and async for speed -# -if mount -oremount,rw,async $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async." -else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async." -fi - - -# Now, we don't want to copy an index.htm(l) file, so let's do away with that -# -rm -f $TEMPDIR/index.ht* - - -# move everything over to the boot medium -# -echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH" -mv $TEMPDIR/* $DOWNLOADPATH -cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? -if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." - if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful." - else - echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT." - fi -fi - - -# let's check if we just downloaded a copy of our running system -# -echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" -if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ - [ -d "$OTHERSYSTEMFULLPATH" ] ; then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \ - "$RUNNINGSYSTEMNAME." - return 0 # current is newest, nothing to do, - # we want to keep the old system in OTHERSYSTEMFULLPATH - # as a fallback -fi - - -# make sure our destination path really exists -# -mkdir -p $OTHERSYSTEMFULLPATH - - -# let's check if our destination is already up to date or needs updating -# -echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" -if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ - "'$OTHERSYSTEMNAME'." - return 0 # OTHERSYSTEMFULLPATH is already up to date -else - # keep rsyncing until the update is complete - echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" - while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH - do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." - sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." - done -fi - - -# change default boot to the image we just downloaded and installed -# -if [ -n "$SYSLINUXPATH" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME." - sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ - $SYSLINUXPATH/syslinux.cfg - -elif [ -n "$GRUBPATH" ]; then - MENULST=$GRUBPATH/menu.lst - CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') - CURRENTTITLEPOSITION=$(grep '^title' $MENULST | - grep -n "${RUNNINGSYSTEMNAME}" | - awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') - CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) - OTHERTITLEPOSITION=$(grep '^title' $MENULST | - grep -n "${OTHERSYSTEMNAME}" | - awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') - OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) - if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." - sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ - $MENULST - else - echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default." - echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'." - fi -else - echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader." -fi - -# we're on an async mount point, so let's sync to be safe -# -sync - - -# umount tempdir to free memory -# -if [ -d $TEMPDIR ]; then - cleanup -fi - - -# now, change mount back to ro and sync -# -if [ -n "$NTFSROOT" ]; then - if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." - else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'." - fi -else - if mount -oremount,ro,sync $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync." - else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync." - fi -fi - -) & - -} - -LiveAutoUpdateMain - diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions deleted file mode 100755 index 4e417db..0000000 --- a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -X2GoGetPortableAppSessions () -{ - -# Output startup message -# -echo -n " x2go-getportableappsessions" - -# This script is for using the iso-hybrid image along with the "second partition" patch -# it allows you to share a configuration between X2GoClient for Windows in portable -# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions - -if [ -L /dev/disk/by-label/PORTABLEAPP ]; then - mkdir -p /media/PORTABLEAPP && \ - mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \ - ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions -else - true -fi -} - -X2GoGetPortableAppSessions diff --git a/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey b/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey deleted file mode 100755 index 1f7b486..0000000 --- a/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - - -X2GoGetOpenSSHPortableClientKey () -{ - # Output startup message - # - echo -n " x2go-getopensshportableclientkey" - - # This script is for using the iso-hybrid image along with the "second partition" patch - # it allows you to share ssh secret keys between X2GoClient for Windows in portable - # mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions - - # Homedir of client side X2Go ThinClient Account - # - X2GOHOME="/home/user/" - - # Homedir of Portable App Installation - # - HOME="/media/PORTABLEAPP/" - - if [ -d "$HOME" ] && [ -d "$X2GOHOME" ]; then - - # create .ssh-Directory in case it doesn't exist - # - mkdir -p $(readlink -m "$X2GOHOME/.ssh/") - - for KEYFILE in $HOME/ssh/* ; do - [ -s "$KEYFILE" ] || continue - KEYDESTPATH="$X2GOHOME/.ssh/$(basename "$KEYFILE")" - touch "$KEYDESTPATH" - chown user:user \ - $KEYDESTPATH - chmod 600 $KEYDESTPATH - cat $(readlink -m "$KEYFILE")>$KEYDESTPATH - - done - - # this is so the path name in the sessions file matches again - # (cannot use .ssh on FAT, for example) - ln -s $X2GOHOME/.ssh $X2GOHOME/ssh - fi -} - -X2GoGetOpenSSHPortableClientKey - diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint deleted file mode 100755 index 2bb453b..0000000 --- a/config/includes.chroot/lib/live/config/2500-tcpprint +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -TcpPrint () -{ - -# Output startup message -# -echo -n " tcpprint" - -if grep -q "\W*tcpprint\W*" /proc/cmdline ; then - TCPPRINTONLYFROM=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }') - if [ -n "$TCPPRINTONLYFROM" ] ; then - TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM" - fi - # Backgrounding - ( - - while ! lsmod | grep -q "^lp"; do - # Wait till modprobe lp has occurred - # -> this means /dev is fully populated - # => USB-Printers can be detected now, too - sleep 30 - done - - PRINTERDEVICES="" - [ -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) - - # Create a listening port for a TCP/9100-RAW-printer - # - # printers may be at /dev/lp_ and at /dev/usb/lp_ - PRINTERCOUNT=0 - for PRINTERDEV in $PRINTERDEVICES; do - PORTNUMBER=$((PRINTERCOUNT+9100)) - echo "jetdirect${PRINTERCOUNT} ${PORTNUMBER}/tcp" >>/etc/services - cat >/etc/xinetd.d/jetdirect${PRINTERCOUNT} << JETDIRCONF -service jetdirect${PRINTERCOUNT} -{ - socket_type = stream - protocol = tcp - wait = no - user = root - server = /bin/dd - server_args = of=$PRINTERDEV bs=1024k - groups = yes - disable = no - instances = 1 - $TCPPRINTONLYFROM -} -JETDIRCONF - echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(fgconsole -n) - 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) - if /etc/init.d/xinetd restart; then - echo -n " success. All done." | tee -a /dev/tty\$(fgconsole -n) - else - echo -n " error." | tee -a /dev/tty\$(fgconsole -n) - fi - else - echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(fgconsole -n) - fi - - ) & -fi -} - -TcpPrint diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions deleted file mode 100755 index eff3073..0000000 --- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -X2GoGetSessions () -{ - # Output startup message - # - echo -n " x2go-getsessions" - - SESSIONSURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^sessionsurl=/ { print $2 }') - if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then - # only mv this file if SESSIONSURL was set. If not, leave it in place - as - # it might have been customized at image creation time - mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old - SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new - cat >/etc/network/if-up.d/0400-getsessions <<GETSESS -#!/bin/bash -export TERM=linux; - -while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) - 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 -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(fgconsole -n) - 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) - sleep 5 - done -fi - -if [ -s $SESSIONSDESTINATION ] ; then - mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions -fi -GETSESS - chmod 755 /etc/network/if-up.d/0400-getsessions - fi -} - -X2GoGetSessions -- 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
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 8e93130a09363b2c79ece3a85549b9839e4b99c2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 14:32:47 2017 +0200 renamed files to make space for a new 2000- file --- .../lib/live/config/2100-showifconfig | 43 ++ .../includes.chroot/lib/live/config/2200-lockuser | 20 + .../lib/live/config/2250-getsshpubkeysfromserver | 55 +++ .../lib/live/config/2300-xserver-xorg-getxorgconf | 45 +++ .../lib/live/config/2400-live-autoupdate | 439 +++++++++++++++++++++ .../live/config/2500-x2go-getportableappsessions | 23 ++ .../config/2510-x2go-getopensshportableclientkey | 46 +++ .../includes.chroot/lib/live/config/2600-tcpprint | 76 ++++ .../lib/live/config/2700-x2go-getsessions | 49 +++ 9 files changed, 796 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig new file mode 100755 index 0000000..9467e47 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -0,0 +1,43 @@ +#!/bin/bash + +ShowIFConfig () +{ + +# Output startup message +# +echo -n " showifconfig" + +# wait until terminal is available +while ! [ -c /dev/tty$(fgconsole -n) ] ; do + sleep 10 +done + +# Make sure no language-specific stuff interferes with our matching +# grep: highlight everything that matches "inet" to the end of its line +# and also (-E, |$) show every line that has an end => Everything else +cat >/etc/network/if-up.d/0100-showips <<SHOWIPS +#!/bin/bash +export TERM=linux; + +while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) + 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/0100-showips + +} + +ShowIFConfig diff --git a/config/includes.chroot/lib/live/config/2200-lockuser b/config/includes.chroot/lib/live/config/2200-lockuser new file mode 100755 index 0000000..1cbcc15 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2200-lockuser @@ -0,0 +1,20 @@ +#!/bin/sh + +LockUser () +{ + +# Output startup message +# +echo -n " lockuser" + + +# Set password +# +if grep -q "\W*nouser\W*" /proc/cmdline ; then + passwd -l user >/dev/null +fi + +} + +LockUser + diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver new file mode 100755 index 0000000..21f0c31 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -0,0 +1,55 @@ +#!/bin/sh + +GetSSHPubKeysFromServer () +{ + + # Output startup message + # + echo -n " getsshpubkeysfromserver" + + + PUBKEYURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^pubkey=/ { print $2 }') + + if [ -n "$PUBKEYURL" ] ; then + cat >/etc/network/if-up.d/0200-getsshpubkeysfromserver <<GETPUBKEY +#!/bin/bash +export TERM=linux; + +while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) + 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 "$PUBKEYURL" | 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 +GETPUBKEY + + chmod 755 /etc/network/if-up.d/0200-getsshpubkeysfromserver + fi + +} + +GetSSHPubKeysFromServer + diff --git a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf new file mode 100755 index 0000000..06794b1 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -0,0 +1,45 @@ +#!/bin/sh + +XServerXorgGetXorgConf () +{ +# Output startup message +# +echo -n " xserver-xorg-getxorgconf" + + XORGCONFURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^xorgconfurl=/ { print $2 }') + if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then + XORGCONFDESTINATION=/etc/X11/xorg.conf.new + cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG +#!/bin/bash +export TERM=linux; + +while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) + 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/0300-getxorgconf + fi +} +XServerXorgGetXorgConf diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate new file mode 100755 index 0000000..7e88812 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -0,0 +1,439 @@ +#!/bin/sh + +cleanup () +{ # discard contents of tmpfs, umount if necessary + if [ -n "$NTFSROOT" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': Removing '$TEMPDIR/*'." + rm -rf $TEMPDIR/* + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounting '$TEMPDIR'." + umount $TEMPDIR + fi + if rmdir $TEMPDIR; then + echo -en "\n$(date +'%F | %T | ')'\$0': Removed empty directory '$TEMPDIR'." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Could not remove directory '$TEMPDIR'." + fi + if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Could not unmount '$MOUNTPOINT'." + fi + fi +} + +LiveAutoUpdateMain () +{ +# Output startup message +# +echo -n " live-autoupdater (backgrounding update task)" + + +# Background everything +# +( + +# redirect all output to first available VT console +# +exec >/dev/tty$(fgconsole -n) 2>&1 + + +# clear console +# +clear + + +# This is so grep, awk and sed will match the right terms regardless of LANG +# +unset LANG +unset LC_ALL +unset LC_MESSAGES + + +# download url pointing to directory with all required files goes here +DOWNLOADURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updateurl=/ { print $2 }') + +if [ -z "$DOWNLOADURL" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting." + return 0 +fi + +# Bandwidth limit goes here +# +#BWLIMITPERCENT=20 # in percent, numeric-only +BWLIMITPERCENT=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^bwlimit=/ { print $2 }') +if [ -z "$BWLIMITPERCENT" ]; then + BWLIMITPERCENT=20 + echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%." +fi + + + +# sleeping a random amount of time to ease load on the update server +# +MAXSLEEPTIME=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') +if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then + MAXSLEEPTIME=900 +fi +SLEEPTIME=0 +echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." +# During startup, script is run with /bin/sh, +# even when #!/bin/bash is set, +# so we need to improvise. +RND=$(/bin/bash -c 'echo $RANDOM') +SLEEPTIME=$((RND%MAXSLEEPTIME)) +if [ $SLEEPTIME -lt 120 ]; then + SLEEPTIME=$((SLEEPTIME+120)) +fi +echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..." +sleep $SLEEPTIME + + +# Define our mountpoint and check if we're capable of auto-updating +NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') +if [ -n "$NTFSROOT" ]; then + mkdir -p /lib/live/mount/ntfsroot + # This is in case we've been passed an incomplete UUID and/or one with dashes + # For example, "vol c:" on Windows will return the last 8 digits of the UUID + # only, and separate them with a dash. + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(echo $NTFSROOT | tr -d '-') + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) + fi + fi + + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then + echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + fi + # TODO: Further error handling + MOUNTPOINT="/lib/live/mount/ntfsroot/" + # create a temporary directory + TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) +else + MOUNTPOINT="/lib/live/mount/findiso/" + # create a temporary directory and mount a tmpfs there + TEMPDIR=$(mktemp -d --tmpdir=/mnt) + + if [ -d /lib/live/mount/findiso/ ] ; then + # if we have access to the entire filesystem, use the + # directory size as base size for the current image - + # and if the download directory is even bigger, use that size + IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))") + IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download") + [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD + else + IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + fi + # multiply current size by 1.5 as safety margin + mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR + +fi +if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ + ( \ + [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ + [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ + ) \ + ); then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update." + return 0 # directories missing, most likely not a writeable medium +fi + + +# define and figure out some paths that we will be needing later on +# +if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/" +elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/syslinux/" +elif [ -f "$MOUNTPOINT/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/" +elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/grub/" +elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/boot/grub/" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found." + return 1 +fi + +RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^findiso=/ { print $2 }')")) + +ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) +RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) +if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then + OTHERSYSTEMNAME="X2Go-live2" +elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then + OTHERSYSTEMNAME="X2Go-live1" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system." + return 1 +fi +OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") +DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") + + +# Now we'll copy the content of the X2Go-live-download folder to our tempdir +# this is so we can run wget in update mode (-N) or rsync without needing +# write access to our boot medium (write access means increased wear and tear, +# and we want to avoid that especially for media that has no wear-leveling +# like CF cards) +# +while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + sleep 30 + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." +done + + +# Now let's figure out if we're supposed to use wget or rsync for downloading +# +if echo "$DOWNLOADURL" | grep -q "^http" || \ + echo "$DOWNLOADURL" | grep -q "^ftp" + then + # Attempt to determine available bandwidth & to set BWLIMIT accordingly + wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ + --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img + cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" + rm "/tmp/x2go-tce-initrd.img" + SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ + $7 == "-" { print $5 }' /tmp/dl.log | \ + tail -1 \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "KB/s") SIZEFACTOR=1;; + "MB/s") SIZEFACTOR=1024;; + "GB/s") SIZEFACTOR=1048576;; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ + { print $4 }' /tmp/dl.log | \ + tail -1 + ) + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --progress=bar:force \ + --limit-rate=${BWLIMIT}k $DOWNLOADURL" + +elif echo "$DOWNLOADURL" | grep -q "^rsync"; then + + rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ + $TEMPDIR/x2go-tce-initrd.img.new + mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img + SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $11 }' \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "K") SIZEFACTOR=1;; + "M") SIZEFACTOR=1024;; + "G") SIZEFACTOR=$((1024*1024));; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $10 }') + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ + $TEMPDIR" +else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting." + return 1 +fi +rm /tmp/dl.log + + +# Proceed to download from update location +# +while ! $DOWNLOADCOMMAND; do + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + sleep 30 + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." +done + +# Now check if these files are different from what we already have in our +# download directory on the boot medium +# +echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." +if diff -q $DOWNLOADPATH $TEMPDIR \ + >/dev/null + + then + cleanup + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium +else + echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..." +fi + + +# If we made it past that point, it's time to update the boot medium, so let's +# remount it rw and async for speed +# +if mount -oremount,rw,async $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async." +else + echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async." +fi + + +# Now, we don't want to copy an index.htm(l) file, so let's do away with that +# +rm -f $TEMPDIR/index.ht* + + +# move everything over to the boot medium +# +echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH" +mv $TEMPDIR/* $DOWNLOADPATH +cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? +if [ -n "$NTFSROOT" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then + echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT." + fi +fi + + +# let's check if we just downloaded a copy of our running system +# +echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" +if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ + [ -d "$OTHERSYSTEMFULLPATH" ] ; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \ + "$RUNNINGSYSTEMNAME." + return 0 # current is newest, nothing to do, + # we want to keep the old system in OTHERSYSTEMFULLPATH + # as a fallback +fi + + +# make sure our destination path really exists +# +mkdir -p $OTHERSYSTEMFULLPATH + + +# let's check if our destination is already up to date or needs updating +# +echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" +if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ + "'$OTHERSYSTEMNAME'." + return 0 # OTHERSYSTEMFULLPATH is already up to date +else + # keep rsyncing until the update is complete + echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH + do + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + sleep 30 + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." + done +fi + + +# change default boot to the image we just downloaded and installed +# +if [ -n "$SYSLINUXPATH" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME." + sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ + $SYSLINUXPATH/syslinux.cfg + +elif [ -n "$GRUBPATH" ]; then + MENULST=$GRUBPATH/menu.lst + CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') + CURRENTTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${RUNNINGSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') + CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) + OTHERTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${OTHERSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') + OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) + if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ + $MENULST + else + echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default." + echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'." + fi +else + echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader." +fi + +# we're on an async mount point, so let's sync to be safe +# +sync + + +# umount tempdir to free memory +# +if [ -d $TEMPDIR ]; then + cleanup +fi + + +# now, change mount back to ro and sync +# +if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'." + fi +else + if mount -oremount,ro,sync $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync." + fi +fi + +) & + +} + +LiveAutoUpdateMain + diff --git a/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions new file mode 100755 index 0000000..4e417db --- /dev/null +++ b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions @@ -0,0 +1,23 @@ +#!/bin/sh + +X2GoGetPortableAppSessions () +{ + +# Output startup message +# +echo -n " x2go-getportableappsessions" + +# This script is for using the iso-hybrid image along with the "second partition" patch +# it allows you to share a configuration between X2GoClient for Windows in portable +# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions + +if [ -L /dev/disk/by-label/PORTABLEAPP ]; then + mkdir -p /media/PORTABLEAPP && \ + mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \ + ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions +else + true +fi +} + +X2GoGetPortableAppSessions diff --git a/config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey b/config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey new file mode 100755 index 0000000..1f7b486 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey @@ -0,0 +1,46 @@ +#!/bin/sh + + +X2GoGetOpenSSHPortableClientKey () +{ + # Output startup message + # + echo -n " x2go-getopensshportableclientkey" + + # This script is for using the iso-hybrid image along with the "second partition" patch + # it allows you to share ssh secret keys between X2GoClient for Windows in portable + # mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions + + # Homedir of client side X2Go ThinClient Account + # + X2GOHOME="/home/user/" + + # Homedir of Portable App Installation + # + HOME="/media/PORTABLEAPP/" + + if [ -d "$HOME" ] && [ -d "$X2GOHOME" ]; then + + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$X2GOHOME/.ssh/") + + for KEYFILE in $HOME/ssh/* ; do + [ -s "$KEYFILE" ] || continue + KEYDESTPATH="$X2GOHOME/.ssh/$(basename "$KEYFILE")" + touch "$KEYDESTPATH" + chown user:user \ + $KEYDESTPATH + chmod 600 $KEYDESTPATH + cat $(readlink -m "$KEYFILE")>$KEYDESTPATH + + done + + # this is so the path name in the sessions file matches again + # (cannot use .ssh on FAT, for example) + ln -s $X2GOHOME/.ssh $X2GOHOME/ssh + fi +} + +X2GoGetOpenSSHPortableClientKey + diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint new file mode 100755 index 0000000..2bb453b --- /dev/null +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -0,0 +1,76 @@ +#!/bin/bash + +TcpPrint () +{ + +# Output startup message +# +echo -n " tcpprint" + +if grep -q "\W*tcpprint\W*" /proc/cmdline ; then + TCPPRINTONLYFROM=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }') + if [ -n "$TCPPRINTONLYFROM" ] ; then + TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM" + fi + # Backgrounding + ( + + while ! lsmod | grep -q "^lp"; do + # Wait till modprobe lp has occurred + # -> this means /dev is fully populated + # => USB-Printers can be detected now, too + sleep 30 + done + + PRINTERDEVICES="" + [ -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) + + # Create a listening port for a TCP/9100-RAW-printer + # + # printers may be at /dev/lp_ and at /dev/usb/lp_ + PRINTERCOUNT=0 + for PRINTERDEV in $PRINTERDEVICES; do + PORTNUMBER=$((PRINTERCOUNT+9100)) + echo "jetdirect${PRINTERCOUNT} ${PORTNUMBER}/tcp" >>/etc/services + cat >/etc/xinetd.d/jetdirect${PRINTERCOUNT} << JETDIRCONF +service jetdirect${PRINTERCOUNT} +{ + socket_type = stream + protocol = tcp + wait = no + user = root + server = /bin/dd + server_args = of=$PRINTERDEV bs=1024k + groups = yes + disable = no + instances = 1 + $TCPPRINTONLYFROM +} +JETDIRCONF + echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(fgconsole -n) + 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) + if /etc/init.d/xinetd restart; then + echo -n " success. All done." | tee -a /dev/tty\$(fgconsole -n) + else + echo -n " error." | tee -a /dev/tty\$(fgconsole -n) + fi + else + echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(fgconsole -n) + fi + + ) & +fi +} + +TcpPrint diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions new file mode 100755 index 0000000..eff3073 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -0,0 +1,49 @@ +#!/bin/sh + +X2GoGetSessions () +{ + # Output startup message + # + echo -n " x2go-getsessions" + + SESSIONSURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^sessionsurl=/ { print $2 }') + if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then + # only mv this file if SESSIONSURL was set. If not, leave it in place - as + # it might have been customized at image creation time + mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old + SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new + cat >/etc/network/if-up.d/0400-getsessions <<GETSESS +#!/bin/bash +export TERM=linux; + +while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) + 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 -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(fgconsole -n) + 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) + sleep 5 + done +fi + +if [ -s $SESSIONSDESTINATION ] ; then + mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions +fi +GETSESS + chmod 755 /etc/network/if-up.d/0400-getsessions + fi +} + +X2GoGetSessions -- 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
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 5d457d2cd431e68a3891662fdefc964561ff965a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 11:16:47 2017 +0200 improved ramdisk size calculation --- config/includes.chroot/lib/live/config/2300-live-autoupdate | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate index 0639616..d09130d 100755 --- a/config/includes.chroot/lib/live/config/2300-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2300-live-autoupdate @@ -128,7 +128,18 @@ else MOUNTPOINT="/lib/live/mount/findiso/" # create a temporary directory and mount a tmpfs there TEMPDIR=$(mktemp -d --tmpdir=/mnt) - IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + + if [ -d /lib/live/mount/findiso/ ] ; then + # if we have access to the entire filesystem, use the + # directory size as base size for the current image - + # and if the download directory is even bigger, use that size + IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))") + IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download") + [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD + else + IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + fi + # multiply current size by 1.5 as safety margin mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR 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
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 5725a6b0a94931b79630bc6fdbaeea8ed3338c2d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 14:55:25 2017 +0200 removed "wait for VT" block, as it is now in a separate script --- config/includes.chroot/lib/live/config/2100-showifconfig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index 9467e47..24268ac 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -7,11 +7,6 @@ ShowIFConfig () # echo -n " showifconfig" -# wait until terminal is available -while ! [ -c /dev/tty$(fgconsole -n) ] ; do - sleep 10 -done - # Make sure no language-specific stuff interferes with our matching # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else -- 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
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 737ed3d2ef20c3866469dd29240d640b390dcbd6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 16:34:18 2017 +0200 fixed HEREDOCs --- config/includes.chroot/lib/live/config/2000-waitforvts | 3 ++- config/includes.chroot/lib/live/config/2050-settime | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts index 43fca6d..3d62af7 100755 --- a/config/includes.chroot/lib/live/config/2000-waitforvts +++ b/config/includes.chroot/lib/live/config/2000-waitforvts @@ -7,7 +7,7 @@ WaitForVTs () # echo -n " waitforvts" -cat >/etc/network/if-up.d/0000-waitforvts <<SHOWIPS +cat >/etc/network/if-up.d/0000-waitforvts <<WAITFORVTS #!/bin/bash export TERM=linux; @@ -16,6 +16,7 @@ while ! [ -c /dev/tty$(fgconsole -n) ] ; do echo -en "\n'\$0' is waiting for an unused VT to become available." sleep 2 done +WAITFORVTS chmod 755 /etc/network/if-up.d/0000-waitforvts diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2050-settime index dddfb1d..549e48b 100755 --- a/config/includes.chroot/lib/live/config/2050-settime +++ b/config/includes.chroot/lib/live/config/2050-settime @@ -7,7 +7,7 @@ SetTime () # echo -n " settime" -cat >/etc/network/if-up.d/0050-settime <<SHOWIPS +cat >/etc/network/if-up.d/0050-settime <<SETTIME #!/bin/bash export TERM=linux; @@ -20,6 +20,7 @@ if ntpdate-debian -s && hwclock --systohc ; then else echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty\$(fgconsole -n) fi +SETTIME chmod 755 /etc/network/if-up.d/0050-settime -- 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
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 638ffb2674d6e0fe6a160315f01413491fdfcd65 Author: Stefan Baur (BAUR-ITCS) <kontakt@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
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 6b5b4c976234026c96ffc8449a11ff27a9e589a9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 14:59:18 2017 +0200 no timestamp here, as clock is most likely wrong --- config/includes.chroot/lib/live/config/2000-waitforvts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts index 8d558e6..43fca6d 100755 --- a/config/includes.chroot/lib/live/config/2000-waitforvts +++ b/config/includes.chroot/lib/live/config/2000-waitforvts @@ -13,7 +13,7 @@ export TERM=linux; # wait until terminal is available while ! [ -c /dev/tty$(fgconsole -n) ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for an unused VT to become available." + echo -en "\n'\$0' is waiting for an unused VT to become available." sleep 2 done -- 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
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 ae9d13e295bf3f9e84cc22b86b083b5f17f80d63 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 20:42:51 2017 +0200 next try: backgrounding this task instead of starting it when network becomes available --- .../lib/live/config/2000-waitforvts | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts index d1b10a7..ac78d84 100755 --- a/config/includes.chroot/lib/live/config/2000-waitforvts +++ b/config/includes.chroot/lib/live/config/2000-waitforvts @@ -7,19 +7,21 @@ WaitForVTs () # echo -n " waitforvts" -cat >/etc/network/if-up.d/0000-waitforvts <<WAITFORVTS -#!/bin/bash -export TERM=linux; +#cat >/etc/network/if-up.d/0000-waitforvts <<WAITFORVTS +##!/bin/bash +#export TERM=linux; -# wait until terminal is available -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 -fgconsole -n >/var/run/availablevt -WAITFORVTS +( + # wait until terminal is available + 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 + fgconsole -n >/var/run/availablevt +) & +#WAITFORVTS -chmod 755 /etc/network/if-up.d/0000-waitforvts +#chmod 755 /etc/network/if-up.d/0000-waitforvts } -- 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
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 d77e9c0bb283070133eea31002458807edca31c4 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 15:08:00 2017 +0200 added time setting script --- .../includes.chroot/lib/live/config/2050-settime | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2050-settime new file mode 100755 index 0000000..dddfb1d --- /dev/null +++ b/config/includes.chroot/lib/live/config/2050-settime @@ -0,0 +1,28 @@ +#!/bin/bash + +SetTime () +{ + +# Output startup message +# +echo -n " settime" + +cat >/etc/network/if-up.d/0050-settime <<SHOWIPS +#!/bin/bash +export TERM=linux; + +while [ -z "\$(hostname -I)" ] ; do + echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n) + 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) +else + echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty\$(fgconsole -n) +fi + +chmod 755 /etc/network/if-up.d/0050-settime + +} + +SetTime -- 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
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 e4940ae8dcb980f6614688496d929e924b9c6028 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 17:32:28 2017 +0200 create debug output in file --- config/includes.chroot/lib/live/config/2000-waitforvts | 1 + 1 file changed, 1 insertion(+) diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts index 3d62af7..69567c0 100755 --- a/config/includes.chroot/lib/live/config/2000-waitforvts +++ b/config/includes.chroot/lib/live/config/2000-waitforvts @@ -16,6 +16,7 @@ while ! [ -c /dev/tty$(fgconsole -n) ] ; do echo -en "\n'\$0' is waiting for an unused VT to become available." sleep 2 done +fgconsole -n >/var/run/availablevt WAITFORVTS chmod 755 /etc/network/if-up.d/0000-waitforvts -- 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
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 8997be31dbd90ec7fc631303a8bea5c8b62edcf6 Author: Stefan Baur (BAUR-ITCS) <kontakt@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
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 a3308b293a9cc1a995b38aa9954f607807de1686 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 22:35:51 2017 +0200 if-up scripts should exit with a NOP when a local network device is changing to up, rather than a real network device --- config/includes.chroot/lib/live/config/2050-settime | 4 ++++ config/includes.chroot/lib/live/config/2100-showifconfig | 4 ++++ config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver | 4 ++++ config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf | 4 ++++ config/includes.chroot/lib/live/config/2700-x2go-getsessions | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2050-settime index b5c17e3..dc062cd 100755 --- a/config/includes.chroot/lib/live/config/2050-settime +++ b/config/includes.chroot/lib/live/config/2050-settime @@ -11,6 +11,10 @@ cat >/etc/network/if-up.d/0050-settime <<SETTIME #!/bin/bash export TERM=linux; +if [ "$METHOD" = loopback ]; then + exit 0 +fi + while [ -z "\$(hostname -I)" ] ; do echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index 81a1276..afa8722 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -14,6 +14,10 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS #!/bin/bash export TERM=linux; +if [ "$METHOD" = loopback ]; then + exit 0 +fi + while [ -z "\$(hostname -I)" ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index d96284d..4749db2 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -17,6 +17,10 @@ GetSSHPubKeysFromServer () #!/bin/bash export TERM=linux; +if [ "$METHOD" = loopback ]; then + exit 0 +fi + while [ -z "\$(hostname -I)" ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 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 3996e85..eb14799 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -15,6 +15,10 @@ echo -n " xserver-xorg-getxorgconf" #!/bin/bash export TERM=linux; +if [ "$METHOD" = loopback ]; then + exit 0 +fi + while [ -z "\$(hostname -I)" ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index 2ee6792..bd59a57 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -18,6 +18,10 @@ X2GoGetSessions () #!/bin/bash export TERM=linux; +if [ "$METHOD" = loopback ]; then + exit 0 +fi + while [ -z "\$(hostname -I)" ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 -- 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
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 dda433e0d995eb4ff82bc2b38763fb55b75e8a47 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 22:39:41 2017 +0200 deleted script file that didn't work anyways --- .../lib/live/config/2000-waitforvts | 28 ---------------------- 1 file changed, 28 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-waitforvts b/config/includes.chroot/lib/live/config/2000-waitforvts deleted file mode 100755 index ac78d84..0000000 --- a/config/includes.chroot/lib/live/config/2000-waitforvts +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -WaitForVTs () -{ - -# Output startup message -# -echo -n " waitforvts" - -#cat >/etc/network/if-up.d/0000-waitforvts <<WAITFORVTS -##!/bin/bash -#export TERM=linux; - -( - # wait until terminal is available - 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 - fgconsole -n >/var/run/availablevt -) & -#WAITFORVTS - -#chmod 755 /etc/network/if-up.d/0000-waitforvts - -} - -WaitForVTs -- 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
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 ca5ecc5ec71a10aa4b84c4432beb02600051dfbb Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 22:38:07 2017 +0200 removed unused code --- config/includes.chroot/lib/live/config/2600-tcpprint | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint index d5005ae..a2b1355 100755 --- a/config/includes.chroot/lib/live/config/2600-tcpprint +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -9,11 +9,6 @@ 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 }') -- 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
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 6238288d36db18a8ca946461519ec02ccca7d689 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 22:53:03 2017 +0200 all if-up tasks are now sent into the background and told to wait until tty becomes available also, fixed indention in tcpprint --- .../includes.chroot/lib/live/config/2000-settime | 24 +- .../lib/live/config/2100-showifconfig | 36 +- .../lib/live/config/2250-getsshpubkeysfromserver | 52 +- .../lib/live/config/2300-xserver-xorg-getxorgconf | 44 +- .../lib/live/config/2400-live-autoupdate | 707 +++++++++++---------- .../includes.chroot/lib/live/config/2600-tcpprint | 5 + .../lib/live/config/2700-x2go-getsessions | 44 +- 7 files changed, 476 insertions(+), 436 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index dc062cd..67afe90 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -15,15 +15,21 @@ if [ "$METHOD" = loopback ]; then exit 0 fi -while [ -z "\$(hostname -I)" ] ; do - 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/tty8 -else - echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8 -fi +( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n'\$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "\$(hostname -I)" ] ; do + 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/tty8 + else + echo -en "\n\$(date +'%F | %T | ')'\$0' - error setting time. Timestamps will be based on CMOS Clock." | tee -a /dev/tty8 + fi +) & SETTIME chmod 755 /etc/network/if-up.d/0050-settime diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index afa8722..6851dde 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -18,21 +18,27 @@ if [ "$METHOD" = loopback ]; then exit 0 fi -while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - 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 ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 + 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/0100-showips diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 4749db2..8cfb1f5 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -21,33 +21,39 @@ if [ "$METHOD" = loopback ]; then exit 0 fi -while [ -z "\$(hostname -I)" ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 - 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 "$PUBKEYURL" | 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 ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "\$(hostname -I)" ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 + 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 "$PUBKEYURL" | 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 -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/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/tty8 - sleep 5 - done -fi +) & GETPUBKEY chmod 755 /etc/network/if-up.d/0200-getsshpubkeysfromserver 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 eb14799..94a6c70 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -19,29 +19,35 @@ if [ "$METHOD" = loopback ]; then exit 0 fi -while [ -z "\$(hostname -I)" ] ; do - 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 - 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 +( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "\$(hostname -I)" ] ; do + 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 + 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 -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/tty8 - sleep 5 + 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/tty8 - sleep 5 - done -fi -if [ -s $XORGCONFDESTINATION ] ; then - mv $XORGCONFDESTINATION /etc/X11/xorg.conf -fi + if [ -s $XORGCONFDESTINATION ] ; then + mv $XORGCONFDESTINATION /etc/X11/xorg.conf + fi +) & GETXORG chmod 755 /etc/network/if-up.d/0300-getxorgconf fi diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 9f3bdfa..24e7c54 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -34,402 +34,407 @@ echo -n " live-autoupdater (backgrounding update task)" # ( -# redirect all output to first available VT console -# -exec >/dev/tty8 2>&1 + while ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + # redirect all output to first available VT console + # + exec >/dev/tty8 2>&1 -# clear console -# -clear + # clear console + # + clear -# This is so grep, awk and sed will match the right terms regardless of LANG -# -unset LANG -unset LC_ALL -unset LC_MESSAGES + # This is so grep, awk and sed will match the right terms regardless of LANG + # + unset LANG + unset LC_ALL + unset LC_MESSAGES -# download url pointing to directory with all required files goes here -DOWNLOADURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^updateurl=/ { print $2 }') -if [ -z "$DOWNLOADURL" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting." - return 0 -fi + # download url pointing to directory with all required files goes here + DOWNLOADURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updateurl=/ { print $2 }') -# Bandwidth limit goes here -# -#BWLIMITPERCENT=20 # in percent, numeric-only -BWLIMITPERCENT=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^bwlimit=/ { print $2 }') -if [ -z "$BWLIMITPERCENT" ]; then - BWLIMITPERCENT=20 - echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%." -fi + if [ -z "$DOWNLOADURL" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting." + return 0 + fi + # Bandwidth limit goes here + # + #BWLIMITPERCENT=20 # in percent, numeric-only + BWLIMITPERCENT=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^bwlimit=/ { print $2 }') + if [ -z "$BWLIMITPERCENT" ]; then + BWLIMITPERCENT=20 + echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%." + fi -# sleeping a random amount of time to ease load on the update server -# -MAXSLEEPTIME=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') -if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then - MAXSLEEPTIME=900 -fi -SLEEPTIME=0 -echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." -# During startup, script is run with /bin/sh, -# even when #!/bin/bash is set, -# so we need to improvise. -RND=$(/bin/bash -c 'echo $RANDOM') -SLEEPTIME=$((RND%MAXSLEEPTIME)) -if [ $SLEEPTIME -lt 120 ]; then - SLEEPTIME=$((SLEEPTIME+120)) -fi -echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..." -sleep $SLEEPTIME - - -# Define our mountpoint and check if we're capable of auto-updating -NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') -if [ -n "$NTFSROOT" ]; then - mkdir -p /lib/live/mount/ntfsroot - # This is in case we've been passed an incomplete UUID and/or one with dashes - # For example, "vol c:" on Windows will return the last 8 digits of the UUID - # only, and separate them with a dash. - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(echo $NTFSROOT | tr -d '-') + + # sleeping a random amount of time to ease load on the update server + # + MAXSLEEPTIME=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') + if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then + MAXSLEEPTIME=900 + fi + SLEEPTIME=0 + echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." + # During startup, script is run with /bin/sh, + # even when #!/bin/bash is set, + # so we need to improvise. + RND=$(/bin/bash -c 'echo $RANDOM') + SLEEPTIME=$((RND%MAXSLEEPTIME)) + if [ $SLEEPTIME -lt 120 ]; then + SLEEPTIME=$((SLEEPTIME+120)) + fi + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..." + sleep $SLEEPTIME + + + # Define our mountpoint and check if we're capable of auto-updating + NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') + if [ -n "$NTFSROOT" ]; then + mkdir -p /lib/live/mount/ntfsroot + # This is in case we've been passed an incomplete UUID and/or one with dashes + # For example, "vol c:" on Windows will return the last 8 digits of the UUID + # only, and separate them with a dash. if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) + NTFSROOT=$(echo $NTFSROOT | tr -d '-') + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) + fi fi - fi - if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then + echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + fi + # TODO: Further error handling + MOUNTPOINT="/lib/live/mount/ntfsroot/" + # create a temporary directory + TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + MOUNTPOINT="/lib/live/mount/findiso/" + # create a temporary directory and mount a tmpfs there + TEMPDIR=$(mktemp -d --tmpdir=/mnt) + + if [ -d /lib/live/mount/findiso/ ] ; then + # if we have access to the entire filesystem, use the + # directory size as base size for the current image - + # and if the download directory is even bigger, use that size + IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))") + IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download") + [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD + else + IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + fi + # multiply current size by 1.5 as safety margin + mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR + fi - # TODO: Further error handling - MOUNTPOINT="/lib/live/mount/ntfsroot/" - # create a temporary directory - TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) -else - MOUNTPOINT="/lib/live/mount/findiso/" - # create a temporary directory and mount a tmpfs there - TEMPDIR=$(mktemp -d --tmpdir=/mnt) - - if [ -d /lib/live/mount/findiso/ ] ; then - # if we have access to the entire filesystem, use the - # directory size as base size for the current image - - # and if the download directory is even bigger, use that size - IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))") - IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download") - [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD - else - IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ + ( \ + [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ + [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ + ) \ + ); then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update." + return 0 # directories missing, most likely not a writeable medium fi - # multiply current size by 1.5 as safety margin - mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR - -fi -if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ - ( \ - [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ - [ -d "$MOUNTPOINT/boot/X2Go-live2" ] \ - ) \ - ); then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update." - return 0 # directories missing, most likely not a writeable medium -fi - - -# define and figure out some paths that we will be needing later on -# -if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then - SYSLINUXPATH="$MOUNTPOINT/" -elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then - SYSLINUXPATH="$MOUNTPOINT/syslinux/" -elif [ -f "$MOUNTPOINT/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/" -elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/grub/" -elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then - GRUBPATH="$MOUNTPOINT/boot/grub/" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found." - return 1 -fi - -RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^findiso=/ { print $2 }')")) - -ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) -RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) -if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then - OTHERSYSTEMNAME="X2Go-live2" -elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then - OTHERSYSTEMNAME="X2Go-live1" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system." - return 1 -fi -OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") -DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") - - -# Now we'll copy the content of the X2Go-live-download folder to our tempdir -# this is so we can run wget in update mode (-N) or rsync without needing -# write access to our boot medium (write access means increased wear and tear, -# and we want to avoid that especially for media that has no wear-leveling -# like CF cards) -# -while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." - sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." -done -# Now let's figure out if we're supposed to use wget or rsync for downloading -# -if echo "$DOWNLOADURL" | grep -q "^http" || \ - echo "$DOWNLOADURL" | grep -q "^ftp" - then - # Attempt to determine available bandwidth & to set BWLIMIT accordingly - wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img - cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" - rm "/tmp/x2go-tce-initrd.img" - SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ - $7 == "-" { print $5 }' /tmp/dl.log | \ - tail -1 \ - ) - case $SIZEFACTORSTRING in - "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " - echo -n "aborting." - cleanup - return 0 - ;; - "KB/s") SIZEFACTOR=1;; - "MB/s") SIZEFACTOR=1024;; - "GB/s") SIZEFACTOR=1048576;; - *) SIZEFACTOR=$((1024*1024*1024));; - esac - DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ - { print $4 }' /tmp/dl.log | \ - tail -1 - ) - BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ - awk ' { print $1*$2*$3/100 }' | \ - awk -F'.' '{ print $1 }' \ - ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" - DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ - --progress=bar:force \ - --limit-rate=${BWLIMIT}k $DOWNLOADURL" - -elif echo "$DOWNLOADURL" | grep -q "^rsync"; then - - rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ - $TEMPDIR/x2go-tce-initrd.img.new - mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img - SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ - awk '$4 == "sent" && $12 == "bytes/sec" \ - { print $11 }' \ - ) - case $SIZEFACTORSTRING in - "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " - echo -n "aborting." - cleanup - return 0 - ;; - "K") SIZEFACTOR=1;; - "M") SIZEFACTOR=1024;; - "G") SIZEFACTOR=$((1024*1024));; - *) SIZEFACTOR=$((1024*1024*1024));; - esac - DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ - awk '$4 == "sent" && $12 == "bytes/sec" \ - { print $10 }') - BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ - awk ' { print $1*$2*$3/100 }' | \ - awk -F'.' '{ print $1 }' \ - ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" - DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ - $TEMPDIR" -else - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting." - return 1 -fi -rm /tmp/dl.log - - -# Proceed to download from update location -# -while ! $DOWNLOADCOMMAND; do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." - sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." -done - -# Now check if these files are different from what we already have in our -# download directory on the boot medium -# -echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." -if diff -q $DOWNLOADPATH $TEMPDIR \ - >/dev/null - - then - cleanup - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." - return 0 # current is newest, nothing to do, we want to avoid - # unneccessary writes to the medium -else - echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..." -fi - - -# If we made it past that point, it's time to update the boot medium, so let's -# remount it rw and async for speed -# -if mount -oremount,rw,async $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async." -else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async." -fi - - -# Now, we don't want to copy an index.htm(l) file, so let's do away with that -# -rm -f $TEMPDIR/index.ht* + # define and figure out some paths that we will be needing later on + # + if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/" + elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then + SYSLINUXPATH="$MOUNTPOINT/syslinux/" + elif [ -f "$MOUNTPOINT/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/" + elif [ -f "$MOUNTPOINT/boot/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/grub/" + elif [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then + GRUBPATH="$MOUNTPOINT/boot/grub/" + else + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found." + return 1 + fi + RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^findiso=/ { print $2 }')")) -# move everything over to the boot medium -# -echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH" -mv $TEMPDIR/* $DOWNLOADPATH -cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? -if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." - if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful." + ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) + RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) + if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then + OTHERSYSTEMNAME="X2Go-live2" + elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then + OTHERSYSTEMNAME="X2Go-live1" else - echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT." + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system." + return 1 fi -fi + OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") + DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") -# let's check if we just downloaded a copy of our running system -# -echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" -if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ - [ -d "$OTHERSYSTEMFULLPATH" ] ; then - [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \ - "$RUNNINGSYSTEMNAME." - return 0 # current is newest, nothing to do, - # we want to keep the old system in OTHERSYSTEMFULLPATH - # as a fallback -fi - - -# make sure our destination path really exists -# -mkdir -p $OTHERSYSTEMFULLPATH + # Now we'll copy the content of the X2Go-live-download folder to our tempdir + # this is so we can run wget in update mode (-N) or rsync without needing + # write access to our boot medium (write access means increased wear and tear, + # and we want to avoid that especially for media that has no wear-leveling + # like CF cards) + # + while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + sleep 30 + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." + done -# let's check if our destination is already up to date or needs updating -# -echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" -if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then + # Now let's figure out if we're supposed to use wget or rsync for downloading + # + if echo "$DOWNLOADURL" | grep -q "^http" || \ + echo "$DOWNLOADURL" | grep -q "^ftp" + then + # Attempt to determine available bandwidth & to set BWLIMIT accordingly + wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ + --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img + cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" + rm "/tmp/x2go-tce-initrd.img" + SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ + $7 == "-" { print $5 }' /tmp/dl.log | \ + tail -1 \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "KB/s") SIZEFACTOR=1;; + "MB/s") SIZEFACTOR=1024;; + "GB/s") SIZEFACTOR=1048576;; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \ + { print $4 }' /tmp/dl.log | \ + tail -1 + ) + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --progress=bar:force \ + --limit-rate=${BWLIMIT}k $DOWNLOADURL" + + elif echo "$DOWNLOADURL" | grep -q "^rsync"; then + + rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ + $TEMPDIR/x2go-tce-initrd.img.new + mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img + SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $11 }' \ + ) + case $SIZEFACTORSTRING in + "" | \ + [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " + echo -n "aborting." + cleanup + return 0 + ;; + "K") SIZEFACTOR=1;; + "M") SIZEFACTOR=1024;; + "G") SIZEFACTOR=$((1024*1024));; + *) SIZEFACTOR=$((1024*1024*1024));; + esac + DLRATE=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ + awk '$4 == "sent" && $12 == "bytes/sec" \ + { print $10 }') + BWLIMIT=$( echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \ + awk ' { print $1*$2*$3/100 }' | \ + awk -F'.' '{ print $1 }' \ + ) # outputs integer kilobytes, not rounded + echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ + $TEMPDIR" + else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ - "'$OTHERSYSTEMNAME'." - return 0 # OTHERSYSTEMFULLPATH is already up to date -else - # keep rsyncing until the update is complete - echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" - while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH - do + echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting." + return 1 + fi + rm /tmp/dl.log + + + # Proceed to download from update location + # + while ! $DOWNLOADCOMMAND; do echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." sleep 30 echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." done -fi + # Now check if these files are different from what we already have in our + # download directory on the boot medium + # + echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." + if diff -q $DOWNLOADPATH $TEMPDIR \ + >/dev/null + + then + cleanup + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium + else + echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..." + fi -# change default boot to the image we just downloaded and installed -# -if [ -n "$SYSLINUXPATH" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME." - sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ - $SYSLINUXPATH/syslinux.cfg - -elif [ -n "$GRUBPATH" ]; then - MENULST=$GRUBPATH/menu.lst - CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') - CURRENTTITLEPOSITION=$(grep '^title' $MENULST | - grep -n "${RUNNINGSYSTEMNAME}" | - awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') - CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) - OTHERTITLEPOSITION=$(grep '^title' $MENULST | - grep -n "${OTHERSYSTEMNAME}" | - awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') - OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) - if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." - sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ - $MENULST + + # If we made it past that point, it's time to update the boot medium, so let's + # remount it rw and async for speed + # + if mount -oremount,rw,async $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async." else - echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default." - echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'." + echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async." fi -else - echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader." -fi -# we're on an async mount point, so let's sync to be safe -# -sync + # Now, we don't want to copy an index.htm(l) file, so let's do away with that + # + rm -f $TEMPDIR/index.ht* -# umount tempdir to free memory -# -if [ -d $TEMPDIR ]; then - cleanup -fi + + # move everything over to the boot medium + # + echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH" + mv $TEMPDIR/* $DOWNLOADPATH + cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? + if [ -n "$NTFSROOT" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then + echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT." + fi + fi -# now, change mount back to ro and sync -# -if [ -n "$NTFSROOT" ]; then - if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." + # let's check if we just downloaded a copy of our running system + # + echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" + if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ + [ -d "$OTHERSYSTEMFULLPATH" ] ; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \ + "$RUNNINGSYSTEMNAME." + return 0 # current is newest, nothing to do, + # we want to keep the old system in OTHERSYSTEMFULLPATH + # as a fallback + fi + + + # make sure our destination path really exists + # + mkdir -p $OTHERSYSTEMFULLPATH + + + # let's check if our destination is already up to date or needs updating + # + echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" + if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then + [ -n "$NTFSROOT" ] && umount $MOUNTPOINT + echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ + "'$OTHERSYSTEMNAME'." + return 0 # OTHERSYSTEMFULLPATH is already up to date else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'." + # keep rsyncing until the update is complete + echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH + do + echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + sleep 30 + echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." + done fi -else - if mount -oremount,ro,sync $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync." + + + # change default boot to the image we just downloaded and installed + # + if [ -n "$SYSLINUXPATH" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME." + sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ + $SYSLINUXPATH/syslinux.cfg + + elif [ -n "$GRUBPATH" ]; then + MENULST=$GRUBPATH/menu.lst + CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r') + CURRENTTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${RUNNINGSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }') + CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1)) + OTHERTITLEPOSITION=$(grep '^title' $MENULST | + grep -n "${OTHERSYSTEMNAME}" | + awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') + OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) + if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then + echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ + $MENULST + else + echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default." + echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'." + fi else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync." + echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader." + fi + + # we're on an async mount point, so let's sync to be safe + # + sync + + + # umount tempdir to free memory + # + if [ -d $TEMPDIR ]; then + cleanup + fi + + + # now, change mount back to ro and sync + # + if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'." + fi + else + if mount -oremount,ro,sync $MOUNTPOINT; then + echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync." + else + echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync." + fi fi -fi ) & diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint index a2b1355..1da6e7b 100755 --- a/config/includes.chroot/lib/live/config/2600-tcpprint +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -25,6 +25,11 @@ if grep -q "\W*tcpprint\W*" /proc/cmdline ; then sleep 30 done + while ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + PRINTERDEVICES="" [ -d /dev/usb ] && PRINTERDEVICES=$(find /dev/usb -type c -name "lp*" | sort) PRINTERDEVICES="$PRINTERDEVICES $(find /dev/ -maxdepth 1 -type c -name "lp*" | sort)" diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index bd59a57..ebbb3c0 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -22,29 +22,35 @@ if [ "$METHOD" = loopback ]; then exit 0 fi -while [ -z "\$(hostname -I)" ] ; do - 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 - 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 +( + while ! [ -c /dev/tty8 ] ; do + echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done + while [ -z "\$(hostname -I)" ] ; do + 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 + 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 -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/tty8 - sleep 5 + 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/tty8 - sleep 5 - done -fi -if [ -s $SESSIONSDESTINATION ] ; then - mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions -fi + if [ -s $SESSIONSDESTINATION ] ; then + mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions + fi +) & GETSESS chmod 755 /etc/network/if-up.d/0400-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
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 091a2f18f422310fdf0d2186b24e9621c260ab94 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 23:29:46 2017 +0200 removed unneccessary escapes --- .../lib/live/config/2400-live-autoupdate | 102 ++++++++++----------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 24e7c54..bc09631 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -3,22 +3,22 @@ cleanup () { # discard contents of tmpfs, umount if necessary if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Removing '$TEMPDIR/*'." + echo -en "\n$(date +'%F | %T | ')'$0': Removing '$TEMPDIR/*'." rm -rf $TEMPDIR/* else - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounting '$TEMPDIR'." + echo -en "\n$(date +'%F | %T | ')'$0': Unmounting '$TEMPDIR'." umount $TEMPDIR fi if rmdir $TEMPDIR; then - echo -en "\n$(date +'%F | %T | ')'\$0': Removed empty directory '$TEMPDIR'." + echo -en "\n$(date +'%F | %T | ')'$0': Removed empty directory '$TEMPDIR'." else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not remove directory '$TEMPDIR'." + echo -en "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." fi if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not unmount '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." fi fi } @@ -35,7 +35,7 @@ echo -n " live-autoupdater (backgrounding update task)" ( while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + echo -en "\n\$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 done @@ -62,7 +62,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F'=' ' /^updateurl=/ { print $2 }') if [ -z "$DOWNLOADURL" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting." + echo -en "\n$(date +'%F | %T | ')'$0': No update URL. Exiting." return 0 fi @@ -74,7 +74,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F'=' ' /^bwlimit=/ { print $2 }') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 - echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%." + echo -en "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." fi @@ -88,7 +88,7 @@ echo -n " live-autoupdater (backgrounding update task)" MAXSLEEPTIME=900 fi SLEEPTIME=0 - echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." + echo -en "\n$(date +'%F | %T | ')'$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." # During startup, script is run with /bin/sh, # even when #!/bin/bash is set, # so we need to improvise. @@ -97,7 +97,7 @@ echo -n " live-autoupdater (backgrounding update task)" if [ $SLEEPTIME -lt 120 ]; then SLEEPTIME=$((SLEEPTIME+120)) fi - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..." + echo -en "\n$(date +'%F | %T | ')'$0': Sleeping for $SLEEPTIME seconds ..." sleep $SLEEPTIME @@ -116,9 +116,9 @@ echo -n " live-autoupdater (backgrounding update task)" fi if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + echo -en "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo -en "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." fi # TODO: Further error handling MOUNTPOINT="/lib/live/mount/ntfsroot/" @@ -150,7 +150,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) \ ); then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update." + echo -en "\n$(date +'%F | %T | ')'$0': No directories suitable for update." return 0 # directories missing, most likely not a writeable medium fi @@ -169,7 +169,7 @@ echo -n " live-autoupdater (backgrounding update task)" GRUBPATH="$MOUNTPOINT/boot/grub/" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found." + echo -en "\n$(date +'%F | %T | ')'$0': No suitable bootloader found." return 1 fi @@ -185,7 +185,7 @@ echo -n " live-autoupdater (backgrounding update task)" OTHERSYSTEMNAME="X2Go-live1" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system." + echo -en "\n$(date +'%F | %T | ')'$0': Unable to determine path/name of running system." return 1 fi OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") @@ -199,9 +199,9 @@ echo -n " live-autoupdater (backgrounding update task)" # like CF cards) # while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + echo -en "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." + echo -en "\n$(date +'%F | %T | ')'$0': Retrying ..." done @@ -221,7 +221,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " + [0-9]) echo -en "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -239,7 +239,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + echo -en "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" @@ -255,7 +255,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - " + [0-9]) echo -en "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -272,12 +272,12 @@ echo -n " live-autoupdater (backgrounding update task)" awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + echo -en "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ $TEMPDIR" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting." + echo -en "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." return 1 fi rm /tmp/dl.log @@ -286,25 +286,25 @@ echo -n " live-autoupdater (backgrounding update task)" # Proceed to download from update location # while ! $DOWNLOADCOMMAND; do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + echo -en "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." + echo -en "\n$(date +'%F | %T | ')'$0': Retrying ..." done # Now check if these files are different from what we already have in our # download directory on the boot medium # - echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." + echo -en "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." if diff -q $DOWNLOADPATH $TEMPDIR \ >/dev/null then cleanup - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + echo -en "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium else - echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..." + echo -en "\n$(date +'%F | %T | ')'$0': Differences detected. Continuing ..." fi @@ -312,9 +312,9 @@ echo -n " live-autoupdater (backgrounding update task)" # remount it rw and async for speed # if mount -oremount,rw,async $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async." + echo -en "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' as rw and async." else - echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async." + echo -en "\n$(date +'%F | %T | ')'$0': Could not remount '$MOUNTPOINT' as rw and async." fi @@ -325,26 +325,26 @@ echo -n " live-autoupdater (backgrounding update task)" # move everything over to the boot medium # - echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH" + echo -en "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" mv $TEMPDIR/* $DOWNLOADPATH cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo -en "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful." + echo -en "\n$(date +'%F | %T | ')'$0': Mount successful." else - echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT." + echo -en "\n$(date +'%F | %T | ')'$0': Failed to mount NTFSROOT." fi fi # let's check if we just downloaded a copy of our running system # - echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" + echo -en "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ [ -d "$OTHERSYSTEMFULLPATH" ] ; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \ + echo -en "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ "$RUNNINGSYSTEMNAME." return 0 # current is newest, nothing to do, # we want to keep the old system in OTHERSYSTEMFULLPATH @@ -359,20 +359,20 @@ echo -n " live-autoupdater (backgrounding update task)" # let's check if our destination is already up to date or needs updating # - echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" + echo -en "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ + echo -en "\n$(date +'%F | %T | ')'$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ "'$OTHERSYSTEMNAME'." return 0 # OTHERSYSTEMFULLPATH is already up to date else # keep rsyncing until the update is complete - echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + echo -en "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH do - echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..." + echo -en "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..." + echo -en "\n$(date +'%F | %T | ')'$0': Retrying ..." done fi @@ -380,7 +380,7 @@ echo -n " live-autoupdater (backgrounding update task)" # change default boot to the image we just downloaded and installed # if [ -n "$SYSLINUXPATH" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME." + echo -en "\n$(date +'%F | %T | ')'$0': Changing syslinux default to $OTHERSYSTEMNAME." sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ $SYSLINUXPATH/syslinux.cfg @@ -396,16 +396,16 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + echo -en "\n$(date +'%F | %T | ')'$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ $MENULST else - echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default." - echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'." + echo -en "\n$(date +'%F | %T | ')'$0': Not changing GRUB-legacy default." + echo -en "\n$(date +'%F | %T | ')'$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo -en "\n$(date +'%F | %T | ')'$0': while default is set to position '$CURRENTDEFAULT'." fi else - echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader." + echo -en "\n$(date +'%F | %T | ')'$0': Unsupported bootloader." fi # we're on an async mount point, so let's sync to be safe @@ -424,15 +424,15 @@ echo -n " live-autoupdater (backgrounding update task)" # if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'." + echo -en "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." fi else if mount -oremount,ro,sync $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync." + echo -en "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." else - echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync." + echo -en "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." fi 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
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 83c9878cd41cf4a38c1112815b8ce9652adf6d1b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 23:31:27 2017 +0200 added missing escapes --- config/includes.chroot/lib/live/config/2000-settime | 2 +- config/includes.chroot/lib/live/config/2100-showifconfig | 2 +- config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver | 2 +- config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2700-x2go-getsessions | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index 67afe90..04ec578 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -11,7 +11,7 @@ cat >/etc/network/if-up.d/0050-settime <<SETTIME #!/bin/bash export TERM=linux; -if [ "$METHOD" = loopback ]; then +if [ "\$METHOD" = loopback ]; then exit 0 fi diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index 6851dde..c45f67e 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -14,7 +14,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS #!/bin/bash export TERM=linux; -if [ "$METHOD" = loopback ]; then +if [ "\$METHOD" = loopback ]; then exit 0 fi diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 8cfb1f5..c25c709 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -17,7 +17,7 @@ GetSSHPubKeysFromServer () #!/bin/bash export TERM=linux; -if [ "$METHOD" = loopback ]; then +if [ "\$METHOD" = loopback ]; then exit 0 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 94a6c70..5c36309 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -15,7 +15,7 @@ echo -n " xserver-xorg-getxorgconf" #!/bin/bash export TERM=linux; -if [ "$METHOD" = loopback ]; then +if [ "\$METHOD" = loopback ]; then exit 0 fi diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index ebbb3c0..d87affe 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -18,7 +18,7 @@ X2GoGetSessions () #!/bin/bash export TERM=linux; -if [ "$METHOD" = loopback ]; then +if [ "\$METHOD" = loopback ]; then exit 0 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
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 ad80b04a24d5238d9f86c1699dd55ca268cd6171 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 22:40:28 2017 +0200 renamed settime script --- config/includes.chroot/lib/live/config/{2050-settime => 2000-settime} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2050-settime b/config/includes.chroot/lib/live/config/2000-settime similarity index 100% rename from config/includes.chroot/lib/live/config/2050-settime rename to config/includes.chroot/lib/live/config/2000-settime -- 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
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 274d0b266ae4b4cd81b3e0a60899ad7eb1110ea1 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 01:05:49 2017 +0200 autoupdate-patch for ramdisk mode --- .../lib/live/config/2400-live-autoupdate | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b1960dc..c5a30ce 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -16,7 +16,7 @@ cleanup () else echo "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." fi - if [ -n "$NTFSROOT" ]; then + if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then if umount $MOUNTPOINT; then echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else @@ -62,6 +62,29 @@ echo -n " live-autoupdater (backgrounding update task)" return 0 fi + if ! [ -d /lib/live/mount/findiso ] ; then + LISTOFPARTITIONS=$(grep -H ^0$ /sys/block/*/removable | awk -F '/' '{ print $4 }' | xargs -n 1 -I XXX fdisk -l /dev/XXX 2>/dev/null | awk '$0 ~ /Linux$/ { print $1}') + TEMPMOUNT=$(mktemp -d -p /lib/live/mount/) + FINDFILE=(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') + [ -z "$FINDFILE" ] && exit 0 + for PARTITON in $LISTOFPARTITIONS ; do + mount $PARTITION $TEMPMOUNT + if ! [ -f $FINDFILE ] ; then + umount $TEMPMOUNT + else + umount $TEMPMOUNT + mkdir /lib/live/mount/findiso + mount $PARTITION /lib/live/mount/findiso + RAMDISKMODE="yes" + break + fi + done + fi + if ! [ -d /lib/live/mount/findiso ] ; then + echo "\n$(date +'%F | %T | ')'$0': Local update directory not found. Exiting." + return 0 + fi + # Bandwidth limit goes here # #BWLIMITPERCENT=20 # in percent, numeric-only @@ -430,6 +453,9 @@ echo -n " live-autoupdater (backgrounding update task)" else echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." fi + if [ -n "$RAMDISKMODE" ] ; then + umount $MOUNTPOINT + fi 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
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 848fdf65f5f4af770ce4393f8352fb84e19d21a1 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 00:11:31 2017 +0200 wait until regular ntpdate if-up.d call has finished --- config/includes.chroot/lib/live/config/2000-settime | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index 04ec578..ba16b24 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -24,6 +24,10 @@ fi echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 done + while [ -f /var/lock/ntpdate ] ; do + echo -en "\n'\$0' is waiting for a previous ntpdate call to finish." | 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/tty8 else -- 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
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 f50dc5f42b5ea717c4403331076054e52a8f4ae8 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 00:18:54 2017 +0200 added debug output --- config/includes.chroot/lib/live/config/2000-settime | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index ba16b24..e41b57f 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -15,11 +15,14 @@ if [ "\$METHOD" = loopback ]; then exit 0 fi -( +( while ! [ -c /dev/tty8 ] ; do echo -en "\n'\$0' is waiting for tty8 to become available." sleep 2 done + + echo -en "\n'\$0': DEBUG: METHOD is '\$METHOD', IFACE is '\$IFACE'." | tee -a /dev/tty8 + while [ -z "\$(hostname -I)" ] ; do echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 -- 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
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 ebe40a0118a2673e6a02efde85da298a5893b8da Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 23:38:47 2017 +0200 /bin/sh instead of /bin/bash requires the use of "echo" instead of "echo -en" --- .../lib/live/config/2400-live-autoupdate | 104 +++++++++++---------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index f4c523b..b1960dc 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -1,24 +1,26 @@ #!/bin/sh +# this is not /bin/bash, so "echo -en" is not supported, but the default when calling "echo" + cleanup () { # discard contents of tmpfs, umount if necessary if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'$0': Removing '$TEMPDIR/*'." + echo "\n$(date +'%F | %T | ')'$0': Removing '$TEMPDIR/*'." rm -rf $TEMPDIR/* else - echo -en "\n$(date +'%F | %T | ')'$0': Unmounting '$TEMPDIR'." + echo "\n$(date +'%F | %T | ')'$0': Unmounting '$TEMPDIR'." umount $TEMPDIR fi if rmdir $TEMPDIR; then - echo -en "\n$(date +'%F | %T | ')'$0': Removed empty directory '$TEMPDIR'." + echo "\n$(date +'%F | %T | ')'$0': Removed empty directory '$TEMPDIR'." else - echo -en "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." + echo "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." fi if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else - echo -en "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." + echo "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." fi fi } @@ -35,7 +37,7 @@ echo -n " live-autoupdater (backgrounding update task)" ( while ! [ -c /dev/tty8 ] ; do - echo -en "\n\$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + echo "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 done @@ -56,7 +58,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F'=' ' /^updateurl=/ { print $2 }') if [ -z "$DOWNLOADURL" ]; then - echo -en "\n$(date +'%F | %T | ')'$0': No update URL. Exiting." + echo "\n$(date +'%F | %T | ')'$0': No update URL. Exiting." return 0 fi @@ -68,7 +70,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F'=' ' /^bwlimit=/ { print $2 }') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 - echo -en "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." + echo "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." fi @@ -82,7 +84,7 @@ echo -n " live-autoupdater (backgrounding update task)" MAXSLEEPTIME=900 fi SLEEPTIME=0 - echo -en "\n$(date +'%F | %T | ')'$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." + echo "\n$(date +'%F | %T | ')'$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." # During startup, script is run with /bin/sh, # even when #!/bin/bash is set, # so we need to improvise. @@ -91,7 +93,7 @@ echo -n " live-autoupdater (backgrounding update task)" if [ $SLEEPTIME -lt 120 ]; then SLEEPTIME=$((SLEEPTIME+120)) fi - echo -en "\n$(date +'%F | %T | ')'$0': Sleeping for $SLEEPTIME seconds ..." + echo "\n$(date +'%F | %T | ')'$0': Sleeping for $SLEEPTIME seconds ..." sleep $SLEEPTIME @@ -110,9 +112,9 @@ echo -n " live-autoupdater (backgrounding update task)" fi if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo -en "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + echo "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." else - echo -en "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." fi # TODO: Further error handling MOUNTPOINT="/lib/live/mount/ntfsroot/" @@ -144,7 +146,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) \ ); then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'$0': No directories suitable for update." + echo "\n$(date +'%F | %T | ')'$0': No directories suitable for update." return 0 # directories missing, most likely not a writeable medium fi @@ -163,7 +165,7 @@ echo -n " live-autoupdater (backgrounding update task)" GRUBPATH="$MOUNTPOINT/boot/grub/" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'$0': No suitable bootloader found." + echo "\n$(date +'%F | %T | ')'$0': No suitable bootloader found." return 1 fi @@ -179,7 +181,7 @@ echo -n " live-autoupdater (backgrounding update task)" OTHERSYSTEMNAME="X2Go-live1" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'$0': Unable to determine path/name of running system." + echo "\n$(date +'%F | %T | ')'$0': Unable to determine path/name of running system." return 1 fi OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") @@ -193,9 +195,9 @@ echo -n " live-autoupdater (backgrounding update task)" # like CF cards) # while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo -en "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo -en "\n$(date +'%F | %T | ')'$0': Retrying ..." + echo "\n$(date +'%F | %T | ')'$0': Retrying ..." done @@ -215,7 +217,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " + [0-9]) echo "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -233,7 +235,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + echo "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" @@ -249,7 +251,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -en "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " + [0-9]) echo "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -266,12 +268,12 @@ echo -n " live-autoupdater (backgrounding update task)" awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo -en "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + echo "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ $TEMPDIR" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." + echo "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." return 1 fi rm /tmp/dl.log @@ -280,25 +282,25 @@ echo -n " live-autoupdater (backgrounding update task)" # Proceed to download from update location # while ! $DOWNLOADCOMMAND; do - echo -en "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo -en "\n$(date +'%F | %T | ')'$0': Retrying ..." + echo "\n$(date +'%F | %T | ')'$0': Retrying ..." done # Now check if these files are different from what we already have in our # download directory on the boot medium # - echo -en "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." + echo "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." if diff -q $DOWNLOADPATH $TEMPDIR \ >/dev/null then cleanup - echo -en "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + echo "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium else - echo -en "\n$(date +'%F | %T | ')'$0': Differences detected. Continuing ..." + echo "\n$(date +'%F | %T | ')'$0': Differences detected. Continuing ..." fi @@ -306,9 +308,9 @@ echo -n " live-autoupdater (backgrounding update task)" # remount it rw and async for speed # if mount -oremount,rw,async $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' as rw and async." + echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' as rw and async." else - echo -en "\n$(date +'%F | %T | ')'$0': Could not remount '$MOUNTPOINT' as rw and async." + echo "\n$(date +'%F | %T | ')'$0': Could not remount '$MOUNTPOINT' as rw and async." fi @@ -319,26 +321,26 @@ echo -n " live-autoupdater (backgrounding update task)" # move everything over to the boot medium # - echo -en "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" + echo "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" mv $TEMPDIR/* $DOWNLOADPATH cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? if [ -n "$NTFSROOT" ]; then - echo -en "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo -en "\n$(date +'%F | %T | ')'$0': Mount successful." + echo "\n$(date +'%F | %T | ')'$0': Mount successful." else - echo -en "\n$(date +'%F | %T | ')'$0': Failed to mount NTFSROOT." + echo "\n$(date +'%F | %T | ')'$0': Failed to mount NTFSROOT." fi fi # let's check if we just downloaded a copy of our running system # - echo -en "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" + echo "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ [ -d "$OTHERSYSTEMFULLPATH" ] ; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ + echo "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ "$RUNNINGSYSTEMNAME." return 0 # current is newest, nothing to do, # we want to keep the old system in OTHERSYSTEMFULLPATH @@ -353,20 +355,20 @@ echo -n " live-autoupdater (backgrounding update task)" # let's check if our destination is already up to date or needs updating # - echo -en "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" + echo "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo -en "\n$(date +'%F | %T | ')'$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ + echo "\n$(date +'%F | %T | ')'$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ "'$OTHERSYSTEMNAME'." return 0 # OTHERSYSTEMFULLPATH is already up to date else # keep rsyncing until the update is complete - echo -en "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + echo "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH do - echo -en "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo -en "\n$(date +'%F | %T | ')'$0': Retrying ..." + echo "\n$(date +'%F | %T | ')'$0': Retrying ..." done fi @@ -374,7 +376,7 @@ echo -n " live-autoupdater (backgrounding update task)" # change default boot to the image we just downloaded and installed # if [ -n "$SYSLINUXPATH" ]; then - echo -en "\n$(date +'%F | %T | ')'$0': Changing syslinux default to $OTHERSYSTEMNAME." + echo "\n$(date +'%F | %T | ')'$0': Changing syslinux default to $OTHERSYSTEMNAME." sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ $SYSLINUXPATH/syslinux.cfg @@ -390,16 +392,16 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo -en "\n$(date +'%F | %T | ')'$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + echo "\n$(date +'%F | %T | ')'$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ $MENULST else - echo -en "\n$(date +'%F | %T | ')'$0': Not changing GRUB-legacy default." - echo -en "\n$(date +'%F | %T | ')'$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo -en "\n$(date +'%F | %T | ')'$0': while default is set to position '$CURRENTDEFAULT'." + echo "\n$(date +'%F | %T | ')'$0': Not changing GRUB-legacy default." + echo "\n$(date +'%F | %T | ')'$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo "\n$(date +'%F | %T | ')'$0': while default is set to position '$CURRENTDEFAULT'." fi else - echo -en "\n$(date +'%F | %T | ')'$0': Unsupported bootloader." + echo "\n$(date +'%F | %T | ')'$0': Unsupported bootloader." fi # we're on an async mount point, so let's sync to be safe @@ -418,15 +420,15 @@ echo -n " live-autoupdater (backgrounding update task)" # if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else - echo -en "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." + echo "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." fi else if mount -oremount,ro,sync $MOUNTPOINT; then - echo -en "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." + echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." else - echo -en "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." + echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." fi 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
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 36fca82327c80b8147ee611266a2e797c3ddf27e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 01:22:07 2017 +0200 do not trigger on METHOD="none" (which is set when IFACE="--all") --- config/includes.chroot/lib/live/config/2000-settime | 4 +--- config/includes.chroot/lib/live/config/2100-showifconfig | 2 +- config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver | 2 +- config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf | 2 +- config/includes.chroot/lib/live/config/2700-x2go-getsessions | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index e41b57f..40468b0 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -11,7 +11,7 @@ cat >/etc/network/if-up.d/0050-settime <<SETTIME #!/bin/bash export TERM=linux; -if [ "\$METHOD" = loopback ]; then +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then exit 0 fi @@ -21,8 +21,6 @@ fi sleep 2 done - echo -en "\n'\$0': DEBUG: METHOD is '\$METHOD', IFACE is '\$IFACE'." | tee -a /dev/tty8 - while [ -z "\$(hostname -I)" ] ; do echo -en "\n'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index c45f67e..9ccb02b 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -14,7 +14,7 @@ cat >/etc/network/if-up.d/0100-showips <<SHOWIPS #!/bin/bash export TERM=linux; -if [ "\$METHOD" = loopback ]; then +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then exit 0 fi diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index c25c709..4f2abfd 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -17,7 +17,7 @@ GetSSHPubKeysFromServer () #!/bin/bash export TERM=linux; -if [ "\$METHOD" = loopback ]; then +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then exit 0 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 5c36309..f8d7eb4 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -15,7 +15,7 @@ echo -n " xserver-xorg-getxorgconf" #!/bin/bash export TERM=linux; -if [ "\$METHOD" = loopback ]; then +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then exit 0 fi diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index d87affe..792c6b9 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -18,7 +18,7 @@ X2GoGetSessions () #!/bin/bash export TERM=linux; -if [ "\$METHOD" = loopback ]; then +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then exit 0 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
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 815a672a35b7607cf05f398d17c3b3673b1d908e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 23:34:27 2017 +0200 do not clear the console --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index bc09631..f4c523b 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -43,12 +43,6 @@ echo -n " live-autoupdater (backgrounding update task)" # exec >/dev/tty8 2>&1 - - # clear console - # - clear - - # This is so grep, awk and sed will match the right terms regardless of LANG # unset LANG -- 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
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 d3ecdc9b835e7978800534631e600c39ed24a66b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 01:53:15 2017 +0200 typofix --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index c5a30ce..f891700 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -65,7 +65,7 @@ echo -n " live-autoupdater (backgrounding update task)" if ! [ -d /lib/live/mount/findiso ] ; then LISTOFPARTITIONS=$(grep -H ^0$ /sys/block/*/removable | awk -F '/' '{ print $4 }' | xargs -n 1 -I XXX fdisk -l /dev/XXX 2>/dev/null | awk '$0 ~ /Linux$/ { print $1}') TEMPMOUNT=$(mktemp -d -p /lib/live/mount/) - FINDFILE=(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') + FINDFILE=$(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') [ -z "$FINDFILE" ] && exit 0 for PARTITON in $LISTOFPARTITIONS ; do mount $PARTITION $TEMPMOUNT -- 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
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 e35c671bb05a8d9868484e5890650ed626d9761a Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 02:31:57 2017 +0200 changed log output message --- config/includes.chroot/lib/live/config/2000-settime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index d4efb7c..1e9d5b2 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -29,7 +29,7 @@ fi echo -en "\n'\$0' is waiting for a previous ntpdate call to finish." | tee -a /dev/tty8 sleep 2 done - echo -en "\n\$(date +'%F | %T | ')'\$0': METHOD: '\$METHOD' - IFACE: '\$IFACE'." | tee -a /dev/tty8 + echo -en "\n\$(date +'%F | %T | ')'\$0': Interface '\$IFACE' is up - attempting to set time via ntp ..." | tee -a /dev/tty8 if ntpdate-debian -s && hwclock --systohc ; then echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty8 -- 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
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 2b11f9e37d3932ece9b1792674698f79fcda3d49 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 02:34:03 2017 +0200 typofix --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index f891700..ed498bb 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -67,7 +67,7 @@ echo -n " live-autoupdater (backgrounding update task)" TEMPMOUNT=$(mktemp -d -p /lib/live/mount/) FINDFILE=$(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') [ -z "$FINDFILE" ] && exit 0 - for PARTITON in $LISTOFPARTITIONS ; do + for PARTITION in $LISTOFPARTITIONS ; do mount $PARTITION $TEMPMOUNT if ! [ -f $FINDFILE ] ; then umount $TEMPMOUNT -- 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
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 6caf42af30aeb3d4c090604e22a5899a172bcabe Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 02:35:15 2017 +0200 path was wrong --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index ed498bb..62a618c 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -69,7 +69,7 @@ echo -n " live-autoupdater (backgrounding update task)" [ -z "$FINDFILE" ] && exit 0 for PARTITION in $LISTOFPARTITIONS ; do mount $PARTITION $TEMPMOUNT - if ! [ -f $FINDFILE ] ; then + if ! [ -f "$TEMPMOUNT/$FINDFILE" ] ; then umount $TEMPMOUNT else umount $TEMPMOUNT -- 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
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 d2791a38ccb1cc14a354b381b1878cc84bfb166f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 01:55:52 2017 +0200 added debug code again --- config/includes.chroot/lib/live/config/2000-settime | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index 40468b0..d4efb7c 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -29,6 +29,8 @@ fi echo -en "\n'\$0' is waiting for a previous ntpdate call to finish." | tee -a /dev/tty8 sleep 2 done + echo -en "\n\$(date +'%F | %T | ')'\$0': METHOD: '\$METHOD' - IFACE: '\$IFACE'." | tee -a /dev/tty8 + if ntpdate-debian -s && hwclock --systohc ; then echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty8 else -- 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
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 978c2d5a46f768a2ffb356f1aea9ad113d8fb328 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 12:35:24 2017 +0200 IMGSIZEDOWNLOAD was missing a filter that limits its content to $1 (awk-style) --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index fc9681c..94128ca 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -153,7 +153,7 @@ echo -n " live-autoupdater (backgrounding update task)" # directory size as base size for the current image - # and if the download directory is even bigger, use that size IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))" | awk '{ print $1}') - IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download" || echo "0") + IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download" | awk '{ print $1}' || echo "0") [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD else IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') -- 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
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 9027295a8f4f46e0d1a9a42ebdf97ef26e29b213 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 03:24:28 2017 +0200 added resiliency in case download directory is missing, fixed imagesize calculation --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 62a618c..fc9681c 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -152,8 +152,8 @@ echo -n " live-autoupdater (backgrounding update task)" # if we have access to the entire filesystem, use the # directory size as base size for the current image - # and if the download directory is even bigger, use that size - IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))") - IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download") + IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))" | awk '{ print $1}') + IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download" || echo "0") [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD else IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') -- 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
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 a03fb94f220c82578cbf8e35ee5d042b8d908140 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 11:50:30 2017 +0200 added sleep to increase chance that ntpdate manages to connect --- config/includes.chroot/lib/live/config/2000-settime | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-settime b/config/includes.chroot/lib/live/config/2000-settime index 1e9d5b2..cb0ada3 100755 --- a/config/includes.chroot/lib/live/config/2000-settime +++ b/config/includes.chroot/lib/live/config/2000-settime @@ -29,8 +29,10 @@ fi echo -en "\n'\$0' is waiting for a previous ntpdate call to finish." | tee -a /dev/tty8 sleep 2 done - echo -en "\n\$(date +'%F | %T | ')'\$0': Interface '\$IFACE' is up - attempting to set time via ntp ..." | tee -a /dev/tty8 - + echo -en "\n\$(date +'%F | %T | ')'\$0': Interface '\$IFACE' is up - attempting to set time via ntp in 20 seconds ..." | tee -a /dev/tty8 + + sleep 20 # make sure IP, Route, DNS are all up + if ntpdate-debian -s && hwclock --systohc ; then echo -en "\n\$(date +'%F | %T | ')'\$0' - time has been set." | tee -a /dev/tty8 else -- 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
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 04155ebdd50ac19f928e68a7452353ee6bb3dc28 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 18:19:05 2017 +0200 expanded logging, changed log messages --- config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 4f2abfd..7365b9b 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -38,18 +38,19 @@ fi touch /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys + echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting SSH public keyfile download ..." | tee -a /dev/tty8 if echo "$PUBKEYURL" | 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 -en "\n\$(date +'%F | %T | ')'\$0': Waiting for SSH Public Key ..." | tee -a /dev/tty8 + echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for download (tftp) ..." | 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/tty8 + echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for download (wget) ..." | 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
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 f9273906327c7643b2e56457662d187255d1145e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 14:28:25 2017 +0200 improved logging, added error detection for mount process --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 94128ca..94e2657 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -63,6 +63,7 @@ echo -n " live-autoupdater (backgrounding update task)" fi if ! [ -d /lib/live/mount/findiso ] ; then + echo "\n$(date +'%F | %T | ')'$0': '/lib/live/mount/findiso' directory not found. Scanning for partitions." LISTOFPARTITIONS=$(grep -H ^0$ /sys/block/*/removable | awk -F '/' '{ print $4 }' | xargs -n 1 -I XXX fdisk -l /dev/XXX 2>/dev/null | awk '$0 ~ /Linux$/ { print $1}') TEMPMOUNT=$(mktemp -d -p /lib/live/mount/) FINDFILE=$(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') @@ -73,9 +74,14 @@ echo -n " live-autoupdater (backgrounding update task)" umount $TEMPMOUNT else umount $TEMPMOUNT + rmdir $TEMPMOUNT mkdir /lib/live/mount/findiso - mount $PARTITION /lib/live/mount/findiso - RAMDISKMODE="yes" + if mount $PARTITION /lib/live/mount/findiso ; then + echo "\n$(date +'%F | %T | ')'$0': mounted $PARTITION as '/lib/live/mount/findiso'." + RAMDISKMODE="yes" + else + echo "\n$(date +'%F | %T | ')'$0': error mounting $PARTITION as '/lib/live/mount/findiso'." + fi break fi done -- 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
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 1c2bd12b6e5f7c595c219b2a998ab2732c200bd3 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 14:36:26 2017 +0200 increased log output --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 94e2657..b736ade 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -223,11 +223,13 @@ echo -n " live-autoupdater (backgrounding update task)" # and we want to avoid that especially for media that has no wear-leveling # like CF cards) # + echo -n "\n$(date +'%F | %T | ')'$0': Preparing tempdir ..." while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 echo "\n$(date +'%F | %T | ')'$0': Retrying ..." done + echo " done." # Now let's figure out if we're supposed to use wget or rsync for downloading @@ -236,6 +238,7 @@ echo -n " live-autoupdater (backgrounding update task)" echo "$DOWNLOADURL" | grep -q "^ftp" then # Attempt to determine available bandwidth & to set BWLIMIT accordingly + echo "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget." wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" @@ -271,6 +274,8 @@ echo -n " live-autoupdater (backgrounding update task)" elif echo "$DOWNLOADURL" | grep -q "^rsync"; then + # Attempt to determine available bandwidth & to set BWLIMIT accordingly + echo "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync." rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ $TEMPDIR/x2go-tce-initrd.img.new mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img @@ -310,10 +315,11 @@ echo -n " live-autoupdater (backgrounding update task)" # Proceed to download from update location # + echo "\n$(date +'%F | %T | ')'$0': starting download ..." while ! $DOWNLOADCOMMAND; do - echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + echo "\n$(date +'%F | %T | ')'$0': an error occurred; sleeping 30 seconds ..." sleep 30 - echo "\n$(date +'%F | %T | ')'$0': Retrying ..." + echo "\n$(date +'%F | %T | ')'$0': retrying ..." done # Now check if these files are different from what we already have in our -- 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
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 55a0fb219be38953e97c7cbb48365e1e63e7484d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 19:21:19 2017 +0200 inserted proper umount/remount_ro -> moved into subroutine, as req'd in two places --- .../lib/live/config/2400-live-autoupdate | 41 +++++++++++++--------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b736ade..22e2778 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -2,6 +2,28 @@ # this is not /bin/bash, so "echo -en" is not supported, but the default when calling "echo" +umount_or_remount_ro () +{# change mount back to ro and sync + # + if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + else + echo "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." + fi + else + if mount -oremount,ro,sync $MOUNTPOINT; then + echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." + else + echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." + fi + if [ -n "$RAMDISKMODE" ] ; then + umount $MOUNTPOINT + fi + fi + +} + cleanup () { # discard contents of tmpfs, umount if necessary if [ -n "$NTFSROOT" ]; then @@ -377,6 +399,8 @@ echo -n " live-autoupdater (backgrounding update task)" [ -n "$NTFSROOT" ] && umount $MOUNTPOINT echo "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ "$RUNNINGSYSTEMNAME." + # now, change mount back to ro and sync + umount_or_remount_ro return 0 # current is newest, nothing to do, # we want to keep the old system in OTHERSYSTEMFULLPATH # as a fallback @@ -453,22 +477,7 @@ echo -n " live-autoupdater (backgrounding update task)" # now, change mount back to ro and sync # - if [ -n "$NTFSROOT" ]; then - if umount $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." - else - echo "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." - fi - else - if mount -oremount,ro,sync $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." - else - echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." - fi - if [ -n "$RAMDISKMODE" ] ; then - umount $MOUNTPOINT - fi - fi + umount_or_remount_ro ) & -- 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
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 552af0a6e6b742f60bf088012cc5f65764252910 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 20:03:56 2017 +0200 when trying to find the right storage device to deploy an update to in ramdisk mode, use read-only mounts at first --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 0ec265a..3f1e0fd 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -91,14 +91,14 @@ echo -n " live-autoupdater (backgrounding update task)" FINDFILE=$(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') [ -z "$FINDFILE" ] && exit 0 for PARTITION in $LISTOFPARTITIONS ; do - mount $PARTITION $TEMPMOUNT + mount -oro $PARTITION $TEMPMOUNT if ! [ -f "$TEMPMOUNT/$FINDFILE" ] ; then umount $TEMPMOUNT else umount $TEMPMOUNT rmdir $TEMPMOUNT mkdir /lib/live/mount/findiso - if mount $PARTITION /lib/live/mount/findiso ; then + if mount -oro $PARTITION /lib/live/mount/findiso ; then echo "\n$(date +'%F | %T | ')'$0': mounted $PARTITION as '/lib/live/mount/findiso'." RAMDISKMODE="yes" else -- 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
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 4bd43f68c250850990fb15e6bdb8365a0e18cb1e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 20:02:36 2017 +0200 removed a cleanup command that would umount /lib/live/mount/findiso when in ramdisk mode, which is a stupid thing to do --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 1 - 1 file changed, 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 22e2778..0ec265a 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -380,7 +380,6 @@ echo -n " live-autoupdater (backgrounding update task)" # echo "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" mv $TEMPDIR/* $DOWNLOADPATH - cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog? if [ -n "$NTFSROOT" ]; then echo "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then -- 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
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 2abcdd2f8328cf1e6f0fb88568104dbc065fc9b2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 20:19:59 2017 +0200 using mv would accumulate clutter in $DOWNLOADPATH if any extra files are present in the source; switched to rsync --delete and rm instead --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 3f1e0fd..6b6ac3f 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -379,7 +379,9 @@ echo -n " live-autoupdater (backgrounding update task)" # move everything over to the boot medium # echo "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" - mv $TEMPDIR/* $DOWNLOADPATH + # using mv would accumulate clutter in $DOWNLOADPATH if any extra files are present in the source + rsync -aPv --inplace --delete --modify-window=1 $TEMPDIR/ $DOWNLOADPATH/ + rm -rf $TEMPDIR/* if [ -n "$NTFSROOT" ]; then echo "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then -- 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
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 2ec192132a9b3bcec6ce47ea96617297cb9dd1fd Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 20:20:41 2017 +0200 only rm if rsync was successful --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 6b6ac3f..9392c8c 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -380,7 +380,7 @@ echo -n " live-autoupdater (backgrounding update task)" # echo "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" # using mv would accumulate clutter in $DOWNLOADPATH if any extra files are present in the source - rsync -aPv --inplace --delete --modify-window=1 $TEMPDIR/ $DOWNLOADPATH/ + rsync -aPv --inplace --delete --modify-window=1 $TEMPDIR/ $DOWNLOADPATH/ && \ rm -rf $TEMPDIR/* if [ -n "$NTFSROOT" ]; then echo "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." -- 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
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 4bb91231e84da1fbebcfdd8b27129083aabc3755 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 21:25:43 2017 +0200 /bin/sh seems to insist on blank between { and # --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 9392c8c..cdcc34f 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -3,8 +3,7 @@ # this is not /bin/bash, so "echo -en" is not supported, but the default when calling "echo" umount_or_remount_ro () -{# change mount back to ro and sync - # +{ # change mount back to ro and sync if [ -n "$NTFSROOT" ]; then if umount $MOUNTPOINT; then echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." -- 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
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 d7f48564c04c1a85e1d77df01d637fd22848df41 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 21:20:51 2017 +0200 improved logging --- .../includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf | 6 ++++-- config/includes.chroot/lib/live/config/2700-x2go-getsessions | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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 f8d7eb4..15b5c2a 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -28,18 +28,20 @@ fi echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 done + + echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting xorg.conf download ..." | tee -a /dev/tty8 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 -en "\n\$(date +'%F | %T | ')'\$0': Waiting for xorg.conf download ..." | tee -a /dev/tty8 + echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for xorg.conf download (tftp) ..." | 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/tty8 + echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for xorg.conf download (wget) ..." | tee -a /dev/tty8 sleep 5 done fi diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index 792c6b9..4105948 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -31,18 +31,20 @@ fi echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty8 sleep 2 done + + echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting session config data download ..." | tee -a /dev/tty8 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 -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty8 + echo -en "\n\$(date +'%F | %T | ')still waiting for session config data (tftp) ..." | 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/tty8 + echo -en "\n\$(date +'%F | %T | ')still waiting for session config data (wget) ..." | 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
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 9c9fee530e2e6188deb385f728f67ffe8e072560 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 22:51:55 2017 +0200 improved logging --- config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver | 1 + config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf | 2 ++ config/includes.chroot/lib/live/config/2700-x2go-getsessions | 1 + 3 files changed, 4 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 7365b9b..2e278cc 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -54,6 +54,7 @@ fi sleep 5 done fi + echo -en "\n\$(date +'%F | %T | ')'\$0': SSH public keyfile download complete." | tee -a /dev/tty8 ) & GETPUBKEY 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 15b5c2a..a5e0a4b 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -46,6 +46,8 @@ fi done fi + echo -en "\n\$(date +'%F | %T | ')'\$0': xorg.conf download complete." | tee -a /dev/tty8 + if [ -s $XORGCONFDESTINATION ] ; then mv $XORGCONFDESTINATION /etc/X11/xorg.conf fi diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index 4105948..6a4901c 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -49,6 +49,7 @@ fi done fi + echo -en "\n\$(date +'%F | %T | ')'\$0': session config data download complete." | tee -a /dev/tty8 if [ -s $SESSIONSDESTINATION ] ; then mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions 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
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 4422ea7e4445e68ee7d05b9d58d7d9381ac60839 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 00:23:52 2017 +0200 only attempt umount when path is a mounted device / improved logging --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index cdcc34f..b384aec 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -38,10 +38,13 @@ cleanup () echo "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." fi if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then - if umount $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." - else - echo "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." + if grep -q "$MOUNTPOINT" /proc/mounts ; then + echo "\n$(date +'%F | %T | ')'$0': '$MOUNTPOINT' is mounted, attempting umount." + if umount $MOUNTPOINT; then + echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + else + echo "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." + fi fi 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
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 8290dc4f62e87a0b4079b8267988043531805f70 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 10:49:21 2017 +0200 mproved logging: bandwidth test should now output progress bar. --- .../includes.chroot/lib/live/config/2400-live-autoupdate | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 8fdae01..7d6d4db 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -259,9 +259,10 @@ echo -n " live-autoupdater (backgrounding update task)" echo "$DOWNLOADURL" | grep -q "^ftp" then # Attempt to determine available bandwidth & to set BWLIMIT accordingly - echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget." - wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img + echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget.\n" + wget -Nr -o - -P /tmp/ -nd \ + --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img | \ + tee /tmp/dl.log cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" rm "/tmp/x2go-tce-initrd.img" SIZEFACTORSTRING=$( awk -F' |\(|\)' ' $9 == "saved" && \ @@ -296,9 +297,10 @@ echo -n " live-autoupdater (backgrounding update task)" elif echo "$DOWNLOADURL" | grep -q "^rsync"; then # Attempt to determine available bandwidth & to set BWLIMIT accordingly - echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync." - rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ - $TEMPDIR/x2go-tce-initrd.img.new + echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync.\n" + rsync -hh -aPv -W --inplace --log-file=- $DOWNLOADURL/x2go-tce-initrd.img \ + $TEMPDIR/x2go-tce-initrd.img.new | \ + tee /tmp/dl.log mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ awk '$4 == "sent" && $12 == "bytes/sec" \ -- 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
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 fd14ca9acc51d6ab65ff0950917b81ae1ecc75d2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 09:45:57 2017 +0200 in ramdisk mode, storage should be umounted at the end of an (attempted) upgrade --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b384aec..c93cd53 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -4,7 +4,7 @@ umount_or_remount_ro () { # change mount back to ro and sync - if [ -n "$NTFSROOT" ]; then + if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then if umount $MOUNTPOINT; then echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else @@ -16,9 +16,6 @@ umount_or_remount_ro () else echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." fi - if [ -n "$RAMDISKMODE" ] ; then - umount $MOUNTPOINT - fi 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
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 59a174da9009877b9892aea3583cd99f4682ac04 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 10:46:04 2017 +0200 in /bin/sh, echo -en is not supported, but echo -n is and should thus be used --- .../lib/live/config/2400-live-autoupdate | 120 ++++++++++----------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index c93cd53..8fdae01 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -1,20 +1,20 @@ #!/bin/sh -# this is not /bin/bash, so "echo -en" is not supported, but the default when calling "echo" +# this is not /bin/bash, so "echo -e" is not supported, but the default when calling "echo" umount_or_remount_ro () { # change mount back to ro and sync if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then if umount $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + echo -n "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else - echo "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." + echo -n "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." fi else if mount -oremount,ro,sync $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." + echo -n "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." else - echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." + echo -n "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." fi fi @@ -23,24 +23,24 @@ umount_or_remount_ro () cleanup () { # discard contents of tmpfs, umount if necessary if [ -n "$NTFSROOT" ]; then - echo "\n$(date +'%F | %T | ')'$0': Removing '$TEMPDIR/*'." + echo -n "\n$(date +'%F | %T | ')'$0': Removing '$TEMPDIR/*'." rm -rf $TEMPDIR/* else - echo "\n$(date +'%F | %T | ')'$0': Unmounting '$TEMPDIR'." + echo -n "\n$(date +'%F | %T | ')'$0': Unmounting '$TEMPDIR'." umount $TEMPDIR fi if rmdir $TEMPDIR; then - echo "\n$(date +'%F | %T | ')'$0': Removed empty directory '$TEMPDIR'." + echo -n "\n$(date +'%F | %T | ')'$0': Removed empty directory '$TEMPDIR'." else - echo "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." + echo -n "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." fi if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then if grep -q "$MOUNTPOINT" /proc/mounts ; then - echo "\n$(date +'%F | %T | ')'$0': '$MOUNTPOINT' is mounted, attempting umount." + echo -n "\n$(date +'%F | %T | ')'$0': '$MOUNTPOINT' is mounted, attempting umount." if umount $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + echo -n "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else - echo "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." + echo -n "\n$(date +'%F | %T | ')'$0': Could not unmount '$MOUNTPOINT'." fi fi fi @@ -58,7 +58,7 @@ echo -n " live-autoupdater (backgrounding update task)" ( while ! [ -c /dev/tty8 ] ; do - echo "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." sleep 2 done @@ -79,12 +79,12 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F'=' ' /^updateurl=/ { print $2 }') if [ -z "$DOWNLOADURL" ]; then - echo "\n$(date +'%F | %T | ')'$0': No update URL. Exiting." + echo -n "\n$(date +'%F | %T | ')'$0': No update URL. Exiting." return 0 fi if ! [ -d /lib/live/mount/findiso ] ; then - echo "\n$(date +'%F | %T | ')'$0': '/lib/live/mount/findiso' directory not found. Scanning for partitions." + echo -n "\n$(date +'%F | %T | ')'$0': '/lib/live/mount/findiso' directory not found. Scanning for partitions." LISTOFPARTITIONS=$(grep -H ^0$ /sys/block/*/removable | awk -F '/' '{ print $4 }' | xargs -n 1 -I XXX fdisk -l /dev/XXX 2>/dev/null | awk '$0 ~ /Linux$/ { print $1}') TEMPMOUNT=$(mktemp -d -p /lib/live/mount/) FINDFILE=$(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') @@ -98,17 +98,17 @@ echo -n " live-autoupdater (backgrounding update task)" rmdir $TEMPMOUNT mkdir /lib/live/mount/findiso if mount -oro $PARTITION /lib/live/mount/findiso ; then - echo "\n$(date +'%F | %T | ')'$0': mounted $PARTITION as '/lib/live/mount/findiso'." + echo -n "\n$(date +'%F | %T | ')'$0': mounted $PARTITION as '/lib/live/mount/findiso'." RAMDISKMODE="yes" else - echo "\n$(date +'%F | %T | ')'$0': error mounting $PARTITION as '/lib/live/mount/findiso'." + echo -n "\n$(date +'%F | %T | ')'$0': error mounting $PARTITION as '/lib/live/mount/findiso'." fi break fi done fi if ! [ -d /lib/live/mount/findiso ] ; then - echo "\n$(date +'%F | %T | ')'$0': Local update directory not found. Exiting." + echo -n "\n$(date +'%F | %T | ')'$0': Local update directory not found. Exiting." return 0 fi @@ -120,7 +120,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F'=' ' /^bwlimit=/ { print $2 }') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 - echo "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." + echo -n "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." fi @@ -134,7 +134,7 @@ echo -n " live-autoupdater (backgrounding update task)" MAXSLEEPTIME=900 fi SLEEPTIME=0 - echo "\n$(date +'%F | %T | ')'$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." + echo -n "\n$(date +'%F | %T | ')'$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..." # During startup, script is run with /bin/sh, # even when #!/bin/bash is set, # so we need to improvise. @@ -143,7 +143,7 @@ echo -n " live-autoupdater (backgrounding update task)" if [ $SLEEPTIME -lt 120 ]; then SLEEPTIME=$((SLEEPTIME+120)) fi - echo "\n$(date +'%F | %T | ')'$0': Sleeping for $SLEEPTIME seconds ..." + echo -n "\n$(date +'%F | %T | ')'$0': Sleeping for $SLEEPTIME seconds ..." sleep $SLEEPTIME @@ -162,9 +162,9 @@ echo -n " live-autoupdater (backgrounding update task)" fi if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + echo -n "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." else - echo "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo -n "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." fi # TODO: Further error handling MOUNTPOINT="/lib/live/mount/ntfsroot/" @@ -196,7 +196,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) \ ); then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "\n$(date +'%F | %T | ')'$0': No directories suitable for update." + echo -n "\n$(date +'%F | %T | ')'$0': No directories suitable for update." return 0 # directories missing, most likely not a writeable medium fi @@ -215,7 +215,7 @@ echo -n " live-autoupdater (backgrounding update task)" GRUBPATH="$MOUNTPOINT/boot/grub/" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "\n$(date +'%F | %T | ')'$0': No suitable bootloader found." + echo -n "\n$(date +'%F | %T | ')'$0': No suitable bootloader found." return 1 fi @@ -231,7 +231,7 @@ echo -n " live-autoupdater (backgrounding update task)" OTHERSYSTEMNAME="X2Go-live1" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "\n$(date +'%F | %T | ')'$0': Unable to determine path/name of running system." + echo -n "\n$(date +'%F | %T | ')'$0': Unable to determine path/name of running system." return 1 fi OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") @@ -246,9 +246,9 @@ echo -n " live-autoupdater (backgrounding update task)" # echo -n "\n$(date +'%F | %T | ')'$0': Preparing tempdir ..." while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + echo -n "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo "\n$(date +'%F | %T | ')'$0': Retrying ..." + echo -n "\n$(date +'%F | %T | ')'$0': Retrying ..." done echo " done." @@ -259,7 +259,7 @@ echo -n " live-autoupdater (backgrounding update task)" echo "$DOWNLOADURL" | grep -q "^ftp" then # Attempt to determine available bandwidth & to set BWLIMIT accordingly - echo "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget." + echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget." wget -Nr -o /tmp/dl.log -P /tmp/ -nd \ --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" @@ -270,7 +270,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " + [0-9]) echo -n "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -288,7 +288,7 @@ echo -n " live-autoupdater (backgrounding update task)" awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + echo -n "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" @@ -296,7 +296,7 @@ echo -n " live-autoupdater (backgrounding update task)" elif echo "$DOWNLOADURL" | grep -q "^rsync"; then # Attempt to determine available bandwidth & to set BWLIMIT accordingly - echo "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync." + echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync." rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ $TEMPDIR/x2go-tce-initrd.img.new mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img @@ -306,7 +306,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " + [0-9]) echo -n "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -323,12 +323,12 @@ echo -n " live-autoupdater (backgrounding update task)" awk ' { print $1*$2*$3/100 }' | \ awk -F'.' '{ print $1 }' \ ) # outputs integer kilobytes, not rounded - echo "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" + echo -n "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ $TEMPDIR" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." + echo -n "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." return 1 fi rm /tmp/dl.log @@ -336,27 +336,27 @@ echo -n " live-autoupdater (backgrounding update task)" # Proceed to download from update location # - echo "\n$(date +'%F | %T | ')'$0': starting download ..." + echo -n "\n$(date +'%F | %T | ')'$0': starting download ..." while ! $DOWNLOADCOMMAND; do - echo "\n$(date +'%F | %T | ')'$0': an error occurred; sleeping 30 seconds ..." + echo -n "\n$(date +'%F | %T | ')'$0': an error occurred; sleeping 30 seconds ..." sleep 30 - echo "\n$(date +'%F | %T | ')'$0': retrying ..." + echo -n "\n$(date +'%F | %T | ')'$0': retrying ..." done # Now check if these files are different from what we already have in our # download directory on the boot medium # - echo "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." + echo -n "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..." if diff -q $DOWNLOADPATH $TEMPDIR \ >/dev/null then cleanup - echo "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium else - echo "\n$(date +'%F | %T | ')'$0': Differences detected. Continuing ..." + echo -n "\n$(date +'%F | %T | ')'$0': Differences detected. Continuing ..." fi @@ -364,9 +364,9 @@ echo -n " live-autoupdater (backgrounding update task)" # remount it rw and async for speed # if mount -oremount,rw,async $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' as rw and async." + echo -n "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' as rw and async." else - echo "\n$(date +'%F | %T | ')'$0': Could not remount '$MOUNTPOINT' as rw and async." + echo -n "\n$(date +'%F | %T | ')'$0': Could not remount '$MOUNTPOINT' as rw and async." fi @@ -377,27 +377,27 @@ echo -n " live-autoupdater (backgrounding update task)" # move everything over to the boot medium # - echo "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" + echo -n "\n$(date +'%F | %T | ')'$0': Moving $TEMPDIR/* => $DOWNLOADPATH" # using mv would accumulate clutter in $DOWNLOADPATH if any extra files are present in the source rsync -aPv --inplace --delete --modify-window=1 $TEMPDIR/ $DOWNLOADPATH/ && \ rm -rf $TEMPDIR/* if [ -n "$NTFSROOT" ]; then - echo "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." + echo -n "\n$(date +'%F | %T | ')'$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'." if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then - echo "\n$(date +'%F | %T | ')'$0': Mount successful." + echo -n "\n$(date +'%F | %T | ')'$0': Mount successful." else - echo "\n$(date +'%F | %T | ')'$0': Failed to mount NTFSROOT." + echo -n "\n$(date +'%F | %T | ')'$0': Failed to mount NTFSROOT." fi fi # let's check if we just downloaded a copy of our running system # - echo "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" + echo -n "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \ [ -d "$OTHERSYSTEMFULLPATH" ] ; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ "$RUNNINGSYSTEMNAME." # now, change mount back to ro and sync umount_or_remount_ro @@ -414,20 +414,20 @@ echo -n " live-autoupdater (backgrounding update task)" # let's check if our destination is already up to date or needs updating # - echo "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" + echo -n "\n$(date +'%F | %T | ')'$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'" if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then [ -n "$NTFSROOT" ] && umount $MOUNTPOINT - echo "\n$(date +'%F | %T | ')'$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do - content of '$DOWNLOADPATH' equals"\ "'$OTHERSYSTEMNAME'." return 0 # OTHERSYSTEMFULLPATH is already up to date else # keep rsyncing until the update is complete - echo "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + echo -n "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH do - echo "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + echo -n "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 - echo "\n$(date +'%F | %T | ')'$0': Retrying ..." + echo -n "\n$(date +'%F | %T | ')'$0': Retrying ..." done fi @@ -435,7 +435,7 @@ echo -n " live-autoupdater (backgrounding update task)" # change default boot to the image we just downloaded and installed # if [ -n "$SYSLINUXPATH" ]; then - echo "\n$(date +'%F | %T | ')'$0': Changing syslinux default to $OTHERSYSTEMNAME." + echo -n "\n$(date +'%F | %T | ')'$0': Changing syslinux default to $OTHERSYSTEMNAME." sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \ $SYSLINUXPATH/syslinux.cfg @@ -451,16 +451,16 @@ echo -n " live-autoupdater (backgrounding update task)" awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }') OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1)) if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then - echo "\n$(date +'%F | %T | ')'$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." + echo -n "\n$(date +'%F | %T | ')'$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..." sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \ $MENULST else - echo "\n$(date +'%F | %T | ')'$0': Not changing GRUB-legacy default." - echo "\n$(date +'%F | %T | ')'$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," - echo "\n$(date +'%F | %T | ')'$0': while default is set to position '$CURRENTDEFAULT'." + echo -n "\n$(date +'%F | %T | ')'$0': Not changing GRUB-legacy default." + echo -n "\n$(date +'%F | %T | ')'$0': Reason: We're at boot position '$CURRENTTITLEPOSITION'," + echo -n "\n$(date +'%F | %T | ')'$0': while default is set to position '$CURRENTDEFAULT'." fi else - echo "\n$(date +'%F | %T | ')'$0': Unsupported bootloader." + echo -n "\n$(date +'%F | %T | ')'$0': Unsupported bootloader." fi # we're on an async mount point, so let's sync to be safe -- 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
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 8330bbe84fd71a7eeb5073fddcdb5ab919abae4b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 12:08:13 2017 +0200 added version and booted system info output, indentation fixed --- .../lib/live/config/2100-showifconfig | 42 ++++++++++++++-------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-showifconfig index 9ccb02b..0b0cea1 100755 --- a/config/includes.chroot/lib/live/config/2100-showifconfig +++ b/config/includes.chroot/lib/live/config/2100-showifconfig @@ -1,16 +1,16 @@ #!/bin/bash -ShowIFConfig () +ShowSysConf () { # Output startup message # -echo -n " showifconfig" +echo -n " show-sysconf" # Make sure no language-specific stuff interferes with our matching # grep: highlight everything that matches "inet" to the end of its line # and also (-E, |$) show every line that has an end => Everything else -cat >/etc/network/if-up.d/0100-showips <<SHOWIPS +cat >/etc/network/if-up.d/0100-show-sysconf <<SHOWSYSCONF #!/bin/bash export TERM=linux; @@ -29,20 +29,34 @@ fi 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; + /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 + + if grep -q findiso /proc/cmdline ; then + BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' $1 == "findiso" { print \$2 }'))) + echo "- Booted Environment: $BOOTEDENV" >> /etc/issue + echo "- Booted Environment: $BOOTEDENV" >> /etc/issue.net + fi + + if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then + TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) + HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") + echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue + echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net + fi ) & -SHOWIPS +SHOWSYSCONF -chmod 755 /etc/network/if-up.d/0100-showips +chmod 755 /etc/network/if-up.d/0100-show-sysconf } -ShowIFConfig +ShowSysConf -- 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
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 21ee0712abee061e1d03bd7d3986219e2eefa63d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 12:19:43 2017 +0200 added steps to further reduce clutter buildup, changed/improved logging --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 7d6d4db..7418e2e 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -424,13 +424,19 @@ echo -n " live-autoupdater (backgrounding update task)" return 0 # OTHERSYSTEMFULLPATH is already up to date else # keep rsyncing until the update is complete - echo -n "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH" + echo -n "\n$(date +'%F | %T | ')'$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH ..." while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH do echo -n "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." sleep 30 echo -n "\n$(date +'%F | %T | ')'$0': Retrying ..." done + echo -n "\n$(date +'%F | %T | ')'$0': done." + if rm -rf $DOWNLOADPATH/* ; then + echo -n "\n$(date +'%F | %T | ')'$0': INFO: purged download directory to avoid clutter buildup." + else + echo -n "\n$(date +'%F | %T | ')'$0': ERROR: unable to purge download directory." + fi 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
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 799fd9001080f9ea863cebefd0271ec13eed33f6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 12:09:04 2017 +0200 renamed file to better represent what it does --- .../lib/live/config/{2100-showifconfig => 2100-show-sysconf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-showifconfig b/config/includes.chroot/lib/live/config/2100-show-sysconf similarity index 100% rename from config/includes.chroot/lib/live/config/2100-showifconfig rename to config/includes.chroot/lib/live/config/2100-show-sysconf -- 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
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 030ade95291720f03a2ecf7dbdfd60b836236eb9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 13:23:51 2017 +0200 make autoupdater show available versions before and after update --- .../includes.chroot/lib/live/config/2400-live-autoupdate | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 7418e2e..b5a56ec 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -2,6 +2,17 @@ # this is not /bin/bash, so "echo -e" is not supported, but the default when calling "echo" +show_versions () +{ # This prints the TCE versions that are stored on the local medium to the log output + LISTOFTIMESTAMPFILES=$(find /lib/live/mount/findiso/boot -name "x2go-tce-timestamp") + if [ -n "$LISTOFTIMESTAMPFILES" ]; then + echo -n "\n$(date +'%F | %T | ')'$0': List of locally stored TCE versions:" + for TIMESTAMPFILE in $LISTOFTIMESTAMPFILES; do + echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(dirname $TIMESTAMPFILE)) $(cat $TIMESTAMPFILE) - $(date --date=@$(cat $TIMESTAMPFILE))" + done + fi +} + umount_or_remount_ro () { # change mount back to ro and sync if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then @@ -112,6 +123,8 @@ echo -n " live-autoupdater (backgrounding update task)" return 0 fi + show_versions + # Bandwidth limit goes here # #BWLIMITPERCENT=20 # in percent, numeric-only @@ -439,6 +452,7 @@ echo -n " live-autoupdater (backgrounding update task)" fi fi + show_versions # change default boot to the image we just downloaded and installed # -- 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
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 0d7e5ef2b8abe936f9108a138c6814941493b8db Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 17:44:10 2017 +0200 write timestamps to text file, for easier querying by checkscripts --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index bdf770c..cc33e7b 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -7,9 +7,12 @@ show_versions () LISTOFTIMESTAMPFILES=$(find /lib/live/mount/findiso/boot -name "x2go-tce-timestamp") if [ -n "$LISTOFTIMESTAMPFILES" ]; then echo -n "\n$(date +'%F | %T | ')'$0': List of locally stored TCE versions:" + echo "--- BEGIN TIMESTAMPS ---" >/var/run/x2go-tce-timestamps for TIMESTAMPFILE in $LISTOFTIMESTAMPFILES; do + echo "$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(dirname $TIMESTAMPFILE)) $(cat $TIMESTAMPFILE) - $(date --date=@$(cat $TIMESTAMPFILE))" done + echo "---- END TIMESTAMPS ----" >>/var/run/x2go-tce-timestamps 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
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 1291b7d458819c1a366e7d113d8977f9d8d3570f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 14:17:36 2017 +0200 wget param change had unintended side effects - log file was empty. rsync does not need the tee helper construct. Various spelling fixes in log output. --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b5a56ec..bdf770c 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -273,8 +273,8 @@ echo -n " live-autoupdater (backgrounding update task)" then # Attempt to determine available bandwidth & to set BWLIMIT accordingly echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget.\n" - wget -Nr -o - -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img | \ + wget -Nr -P /tmp/ -nd \ + --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img 2>&1 | \ tee /tmp/dl.log cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR" rm "/tmp/x2go-tce-initrd.img" @@ -284,7 +284,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -n "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " + [0-9]) echo -n "\n$(date +'%F | %T | ')'$0': Not enough bandwidth for update task - " echo -n "aborting." cleanup return 0 @@ -311,9 +311,8 @@ echo -n " live-autoupdater (backgrounding update task)" # Attempt to determine available bandwidth & to set BWLIMIT accordingly echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync.\n" - rsync -hh -aPv -W --inplace --log-file=- $DOWNLOADURL/x2go-tce-initrd.img \ - $TEMPDIR/x2go-tce-initrd.img.new | \ - tee /tmp/dl.log + rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ + $TEMPDIR/x2go-tce-initrd.img.new mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img SIZEFACTORSTRING=$( sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \ awk '$4 == "sent" && $12 == "bytes/sec" \ @@ -321,7 +320,7 @@ echo -n " live-autoupdater (backgrounding update task)" ) case $SIZEFACTORSTRING in "" | \ - [0-9]) echo -n "\n$(date +'%F | %T | ')'$0': Not enough Bandwidth for update task - " + [0-9]) echo -n "\n$(date +'%F | %T | ')'$0': Not enough bandwidth for update task - " echo -n "aborting." cleanup return 0 -- 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
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 0f025c8b66de5b1d2ade07b51ace44739f14a7b6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 15:43:33 2017 +0200 typofix --- config/includes.chroot/lib/live/config/2100-show-sysconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 0b0cea1..0e0d48c 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -41,7 +41,7 @@ fi echo "\$IPMSG" >> /etc/issue.net if grep -q findiso /proc/cmdline ; then - BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' $1 == "findiso" { print \$2 }'))) + BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' \$1 == "findiso" { print \$2 }'))) echo "- Booted Environment: $BOOTEDENV" >> /etc/issue echo "- Booted Environment: $BOOTEDENV" >> /etc/issue.net 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
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 be21ee7b496693274f7050b8efd7faee2dc4c66d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 16:29:15 2017 +0200 more typofixes --- config/includes.chroot/lib/live/config/2100-show-sysconf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 0e0d48c..0839c77 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -42,8 +42,8 @@ fi if grep -q findiso /proc/cmdline ; then BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' \$1 == "findiso" { print \$2 }'))) - echo "- Booted Environment: $BOOTEDENV" >> /etc/issue - echo "- Booted Environment: $BOOTEDENV" >> /etc/issue.net + echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue + echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net fi if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then -- 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
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 bac0ecc12cab44f429eeef1c8c2fde788239d0a6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 18:33:15 2017 +0200 added code to check timestamp before download --- .../lib/live/config/2400-live-autoupdate | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index ae16e48..30187a0 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -312,6 +312,9 @@ echo -n " live-autoupdater (backgrounding update task)" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" + DOWNLOADCOMMANDFORTIMESTAMP="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --progress=bar:force \ + --limit-rate=${BWLIMIT}k $DOWNLOADURL/x2go-tce-timestamp" elif echo "$DOWNLOADURL" | grep -q "^rsync"; then @@ -346,6 +349,8 @@ echo -n " live-autoupdater (backgrounding update task)" echo -n "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ $TEMPDIR" + DOWNLOADCOMMANDFORTIMESTAMP="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/x2go-tce-timestamp \ + $TEMPDIR" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT echo -n "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." @@ -354,8 +359,23 @@ echo -n " live-autoupdater (backgrounding update task)" rm /tmp/dl.log + # Proceed to download from update location # + echo -n "\n$(date +'%F | %T | ')'$0': starting timestamp download ..." + if ! $DOWNLOADCOMMANDFORTIMESTAMP; then + echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." + else + RUNNINGVERSION=$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) + if [ $RUNNINGVERSION) -ge $(cat $TEMPDIR/x2go-tce-timestamp) ] ; then + cleanup + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." + echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGSYSTEMVERSION - $(date --date=@$RUNNINGSYSTEMVERSION))." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium + fi + fi + echo -n "\n$(date +'%F | %T | ')'$0': starting download ..." while ! $DOWNLOADCOMMAND; do echo -n "\n$(date +'%F | %T | ')'$0': an error occurred; sleeping 30 seconds ..." -- 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
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 9d70846db7d2232ed49f66b09359dafb2d1d4479 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 19:53:53 2017 +0200 typofix --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 30187a0..d526d98 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -367,7 +367,7 @@ echo -n " live-autoupdater (backgrounding update task)" echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." else RUNNINGVERSION=$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) - if [ $RUNNINGVERSION) -ge $(cat $TEMPDIR/x2go-tce-timestamp) ] ; then + if [ $RUNNINGVERSION -ge $(cat $TEMPDIR/x2go-tce-timestamp) ] ; then cleanup echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGSYSTEMVERSION - $(date --date=@$RUNNINGSYSTEMVERSION))." -- 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
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 0e7dcb3c72f931f094ee733e714e41b53a4f0be0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 00:21:05 2017 +0200 mountpoint detection must come earlier in the script, or MOUNTPOINT variable will be empty when it's already needed by other script parts --- .../lib/live/config/2400-live-autoupdate | 85 +++++++++++----------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index d526d98..7bea7e0 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -87,6 +87,48 @@ echo -n " live-autoupdater (backgrounding update task)" unset LC_ALL unset LC_MESSAGES + # Define our mountpoint and check if we're capable of auto-updating + NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') + if [ -n "$NTFSROOT" ]; then + mkdir -p /lib/live/mount/ntfsroot + # This is in case we've been passed an incomplete UUID and/or one with dashes + # For example, "vol c:" on Windows will return the last 8 digits of the UUID + # only, and separate them with a dash. + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(echo $NTFSROOT | tr -d '-') + if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then + NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) + fi + fi + + if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then + echo -n "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." + else + echo -n "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." + fi + # TODO: Further error handling + MOUNTPOINT="/lib/live/mount/ntfsroot/" + # create a temporary directory + TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) + else + MOUNTPOINT="/lib/live/mount/findiso/" + # create a temporary directory and mount a tmpfs there + TEMPDIR=$(mktemp -d --tmpdir=/mnt) + + if [ -d /lib/live/mount/findiso/ ] ; then + # if we have access to the entire filesystem, use the + # directory size as base size for the current image - + # and if the download directory is even bigger, use that size + IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))" | awk '{ print $1}') + IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download" | awk '{ print $1}' || echo "0") + [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD + else + IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') + fi + # multiply current size by 1.5 as safety margin + mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR + + fi # determine our booted environment as well as the other available ones RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ @@ -149,7 +191,6 @@ echo -n " live-autoupdater (backgrounding update task)" fi - # sleeping a random amount of time to ease load on the update server # MAXSLEEPTIME=$(cat /proc/cmdline | \ @@ -172,48 +213,6 @@ echo -n " live-autoupdater (backgrounding update task)" sleep $SLEEPTIME - # Define our mountpoint and check if we're capable of auto-updating - NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }') - if [ -n "$NTFSROOT" ]; then - mkdir -p /lib/live/mount/ntfsroot - # This is in case we've been passed an incomplete UUID and/or one with dashes - # For example, "vol c:" on Windows will return the last 8 digits of the UUID - # only, and separate them with a dash. - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(echo $NTFSROOT | tr -d '-') - if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then - NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) - fi - fi - - if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then - echo -n "\n$(date +'%F | %T | ')'$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'." - else - echo -n "\n$(date +'%F | %T | ')'$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'." - fi - # TODO: Further error handling - MOUNTPOINT="/lib/live/mount/ntfsroot/" - # create a temporary directory - TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT) - else - MOUNTPOINT="/lib/live/mount/findiso/" - # create a temporary directory and mount a tmpfs there - TEMPDIR=$(mktemp -d --tmpdir=/mnt) - - if [ -d /lib/live/mount/findiso/ ] ; then - # if we have access to the entire filesystem, use the - # directory size as base size for the current image - - # and if the download directory is even bigger, use that size - IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))" | awk '{ print $1}') - IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download" | awk '{ print $1}' || echo "0") - [ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD - else - IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}') - fi - # multiply current size by 1.5 as safety margin - mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR - - fi if ! ( [ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \ ( \ [ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \ -- 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
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 d498d22cad28d9408807b29d77db9a964d820a81 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Jul 25 17:52:17 2017 +0200 logfile will now also contain which environment is the running one --- .../lib/live/config/2400-live-autoupdate | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index cc33e7b..ae16e48 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -9,9 +9,10 @@ show_versions () echo -n "\n$(date +'%F | %T | ')'$0': List of locally stored TCE versions:" echo "--- BEGIN TIMESTAMPS ---" >/var/run/x2go-tce-timestamps for TIMESTAMPFILE in $LISTOFTIMESTAMPFILES; do - echo "$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps + echo ";;$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(dirname $TIMESTAMPFILE)) $(cat $TIMESTAMPFILE) - $(date --date=@$(cat $TIMESTAMPFILE))" done + sed -i "s/;$RUNNINGSYSTEMNAME/X;$RUNNINGSYSTEMNAME/i" /var/run/x2go-tce-timestamps echo "---- END TIMESTAMPS ----" >>/var/run/x2go-tce-timestamps fi } @@ -87,6 +88,14 @@ echo -n " live-autoupdater (backgrounding update task)" unset LC_MESSAGES + # determine our booted environment as well as the other available ones + RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^findiso=/ { print $2 }')")) + + ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) + RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) + # download url pointing to directory with all required files goes here DOWNLOADURL=$(cat /proc/cmdline | \ tr ' ' '\n' | \ @@ -235,12 +244,6 @@ echo -n " live-autoupdater (backgrounding update task)" return 1 fi - RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ - tr ' ' '\n' | \ - awk -F'=' ' /^findiso=/ { print $2 }')")) - - ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) - RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then OTHERSYSTEMNAME="X2Go-live2" elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then -- 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
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 9e25c41bd06ffd7c817f34682e80266817b823d5 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 02:44:20 2017 +0200 variable name was wrong --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 7bea7e0..ef504af 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -369,7 +369,7 @@ echo -n " live-autoupdater (backgrounding update task)" if [ $RUNNINGVERSION -ge $(cat $TEMPDIR/x2go-tce-timestamp) ] ; then cleanup echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." - echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGSYSTEMVERSION - $(date --date=@$RUNNINGSYSTEMVERSION))." + echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium 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
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 5b5ebc63fe8cd86f9679f48453506aee58d6f206 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 04:00:21 2017 +0200 looks like debian-live doesn't use /var/run/banner --- config/includes.chroot/lib/live/config/2100-show-sysconf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 4a2c5c5..7217fc6 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -30,7 +30,6 @@ fi # clear old entries sed -i '/^- /d' /etc/issue sed -i '/^- /d' /etc/issue.net - sed -i '/^- /d' /var/run/banner # enable banner in sshd config if it was disabled sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config @@ -57,9 +56,6 @@ fi echo "\$IPMSG" >> /etc/issue.net [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net - echo "\$IPMSG" >> /var/run/banner - [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /var/run/banner - [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /var/run/banner ) & SHOWSYSCONF -- 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
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 f05af2a7cad5da59a496208d7bdd0c137a5d9090 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 03:52:36 2017 +0200 speed optimization, also addedoutputto /var/run/banner where ssh should pick it up --- .../lib/live/config/2100-show-sysconf | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 0839c77..d88a791 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -19,6 +19,13 @@ if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then fi ( + if grep -q findiso /proc/cmdline ; then + BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' \$1 == "findiso" { print \$2 }'))) + fi + if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then + TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) + HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") + fi while ! [ -c /dev/tty8 ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." sleep 2 @@ -36,22 +43,17 @@ fi IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ) sed -i '/^- /d' /etc/issue - sed -i '/^- /d' /etc/issue.net echo "\$IPMSG" >> /etc/issue + [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue + [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue + sed -i '/^- /d' /etc/issue.net echo "\$IPMSG" >> /etc/issue.net - - if grep -q findiso /proc/cmdline ; then - BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | tr " " "\n" | awk -F'=' ' \$1 == "findiso" { print \$2 }'))) - echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue - echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net - fi - - if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then - TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) - HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") - echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue - echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net - fi + [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net + [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net + sed -i '/^- /d' /var/run/banner + echo "\$IPMSG" >> /var/run/banner + [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /var/run/banner + [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /var/run/banner ) & SHOWSYSCONF -- 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
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 f16da78661cf62e259c5d8a6ec85fe258c359238 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 03:57:39 2017 +0200 further speed improvements, also, enable banner in sshd config if it was disabled --- config/includes.chroot/lib/live/config/2100-show-sysconf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index d88a791..4a2c5c5 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -26,6 +26,15 @@ fi TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") fi + + # clear old entries + sed -i '/^- /d' /etc/issue + sed -i '/^- /d' /etc/issue.net + sed -i '/^- /d' /var/run/banner + + # enable banner in sshd config if it was disabled + sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config + while ! [ -c /dev/tty8 ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." sleep 2 @@ -42,15 +51,12 @@ fi /bin/grep -P --color=always "link/ether .*? |$" ) IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ) - sed -i '/^- /d' /etc/issue echo "\$IPMSG" >> /etc/issue [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue - sed -i '/^- /d' /etc/issue.net echo "\$IPMSG" >> /etc/issue.net [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net - sed -i '/^- /d' /var/run/banner echo "\$IPMSG" >> /var/run/banner [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /var/run/banner [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /var/run/banner -- 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
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 e30c11257ac8855533a4d148e0ad594c7d3651c6 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 10:40:47 2017 +0200 test: use motd instead of issue.net --- config/includes.chroot/lib/live/config/2100-show-sysconf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 3962c9b..70dcae3 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -29,10 +29,11 @@ fi # clear old entries sed -i '/^- /d' /etc/issue - sed -i '/^- /d' /etc/issue.net + #sed -i '/^- /d' /etc/issue.net + #sed -i '/^- /d' /etc/motd - # enable banner in sshd config if it was disabled - sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config + ## enable banner in sshd config if it was disabled + #sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config while ! [ -c /dev/tty8 ] ; do echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." @@ -57,6 +58,9 @@ fi echo "\$IPMSG" | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g" >> /etc/issue.net [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net + echo "\$IPMSG" >> /etc/motd + [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/motd + [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/motd ) & SHOWSYSCONF -- 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
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 a83557714640338c08c6ce72e7e29320c7674f7f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 13:39:36 2017 +0200 switched to motd instead of issue.net, removed motd display from pam login so it doesn't appear twice on local login --- config/includes.chroot/lib/live/config/2100-show-sysconf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 70dcae3..1725540 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -29,8 +29,9 @@ fi # clear old entries sed -i '/^- /d' /etc/issue - #sed -i '/^- /d' /etc/issue.net - #sed -i '/^- /d' /etc/motd + # delete motd call from pam login, so we don't get the same greeting twice when logging in locally + sed -i '/^session optional pam_motd.so/d' /etc/pam.d/login + ## enable banner in sshd config if it was disabled #sed -i 's/^#Banner/Banner/' /etc/ssh/sshd_config @@ -54,10 +55,6 @@ fi echo "\$IPMSG" >> /etc/issue [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue - # we need to strip the ANSI as it doesn't work in issue.net via SSH - echo "\$IPMSG" | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g" >> /etc/issue.net - [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net - [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net echo "\$IPMSG" >> /etc/motd [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/motd [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/motd -- 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
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 a12cafee49ab05d86f7efe7aa95fc6be8a1d18e3 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 16:53:08 2017 +0200 motd and issue are now written to simultaneously; once finished, all unused VTs are reloaded to make sure they display the new /etc/issue --- config/includes.chroot/lib/live/config/2100-show-sysconf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 1725540..f3cf38b 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -52,12 +52,12 @@ fi /bin/grep -P --color=always "link/ether .*? |$" ) IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ) - echo "\$IPMSG" >> /etc/issue + echo "\$IPMSG" | tee -a /etc/motd >> /etc/issue [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue - echo "\$IPMSG" >> /etc/motd - [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/motd - [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/motd + + # make sure all unused VTs show the new /etc/issue + ps -C getty --no-header | awk '{ print \$1 }' | xargs -n 1 kill -1 ) & SHOWSYSCONF -- 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
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 885144ef1c56d49d0a1ae79a4333d7b45c8e8466 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 04:05:12 2017 +0200 we need to strip the ANSI as it doesn't work in issue.net via SSH --- config/includes.chroot/lib/live/config/2100-show-sysconf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 7217fc6..3962c9b 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -53,7 +53,8 @@ fi echo "\$IPMSG" >> /etc/issue [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue - echo "\$IPMSG" >> /etc/issue.net + # we need to strip the ANSI as it doesn't work in issue.net via SSH + echo "\$IPMSG" | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g" >> /etc/issue.net [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue.net [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue.net ) & -- 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
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 eb96dadd73eae17a806bda72e690267238033ccf Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 17:17:59 2017 +0200 timestamp is now checked before BWLIMIT is determined -> faster, less traffic --- .../lib/live/config/2400-live-autoupdate | 66 ++++++++++++++++------ 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 2e749ee..0770aca 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -2,6 +2,20 @@ # this is not /bin/bash, so "echo -e" is not supported, but the default when calling "echo" +check_timestamp () +{ #this attempts to download a timestamp file + echo -n "\n$(date +'%F | %T | ')'$0': starting timestamp download ..." + if ! $DOWNLOADCOMMANDFORTIMESTAMP; then + return 1 + else + RUNNINGVERSION=$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) + if [ $RUNNINGVERSION -ge $(cat $TEMPDIR/x2go-tce-timestamp) ] ; then + return 5 + fi + fi + return 0 +} + show_versions () { # This prints the TCE versions that are stored on the local medium to the log output LISTOFTIMESTAMPFILES=$(find /lib/live/mount/findiso/boot -name "x2go-tce-timestamp") @@ -276,6 +290,23 @@ echo -n " live-autoupdater (backgrounding update task)" if echo "$DOWNLOADURL" | grep -q "^http" || \ echo "$DOWNLOADURL" | grep -q "^ftp" then + DOWNLOADCOMMANDFORTIMESTAMP="wget -Nr -l 1 -nd -P "$TEMPDIR" \ + --progress=bar:force \ + $DOWNLOADURL/x2go-tce-timestamp" + + check_timestamp + if [ $? -eq 1 ]; then + echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." + elif [ $? -eq 5 ]; then + cleanup + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." + echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium + else + : # NOP + fi + # Attempt to determine available bandwidth & to set BWLIMIT accordingly echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget.\n" wget -Nr -P /tmp/ -nd \ @@ -311,12 +342,26 @@ echo -n " live-autoupdater (backgrounding update task)" DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \ --progress=bar:force \ --limit-rate=${BWLIMIT}k $DOWNLOADURL" - DOWNLOADCOMMANDFORTIMESTAMP="wget -Nr -l 1 -nd -P "$TEMPDIR" \ - --progress=bar:force \ - --limit-rate=${BWLIMIT}k $DOWNLOADURL/x2go-tce-timestamp" elif echo "$DOWNLOADURL" | grep -q "^rsync"; then + DOWNLOADCOMMANDFORTIMESTAMP="rsync -aPv --inplace $DOWNLOADURL/x2go-tce-timestamp \ + $TEMPDIR" + + check_timestamp + if [ $? -eq 1 ]; then + echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." + elif [ $? -eq 5 ]; then + cleanup + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." + echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium + else + : # NOP + fi + + # Attempt to determine available bandwidth & to set BWLIMIT accordingly echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for rsync.\n" rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \ @@ -348,8 +393,6 @@ echo -n " live-autoupdater (backgrounding update task)" echo -n "\n$(date +'%F | %T | ')'$0': Determined bandwidth limit: '$BWLIMIT KB/s'" DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \ $TEMPDIR" - DOWNLOADCOMMANDFORTIMESTAMP="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/x2go-tce-timestamp \ - $TEMPDIR" else [ -n "$NTFSROOT" ] && umount $MOUNTPOINT echo -n "\n$(date +'%F | %T | ')'$0': Unsupported download mechanism - aborting." @@ -361,19 +404,6 @@ echo -n " live-autoupdater (backgrounding update task)" # Proceed to download from update location # - echo -n "\n$(date +'%F | %T | ')'$0': starting timestamp download ..." - if ! $DOWNLOADCOMMANDFORTIMESTAMP; then - echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." - else - RUNNINGVERSION=$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) - if [ $RUNNINGVERSION -ge $(cat $TEMPDIR/x2go-tce-timestamp) ] ; then - cleanup - echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." - echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." - return 0 # current is newest, nothing to do, we want to avoid - # unneccessary writes to the medium - fi - fi echo -n "\n$(date +'%F | %T | ')'$0': starting download ..." while ! $DOWNLOADCOMMAND; do -- 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
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 216759b29970cc55829fa504e7a336a57fe28a6f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 19:03:39 2017 +0200 tempdir preparation only needs to take place if we need to perform an update or if checking the timestamp failed (the latter part is still missing -> next commit). Also, checking the return code didn't work as expected. Finally, some style fixes. --- .../lib/live/config/2400-live-autoupdate | 51 ++++++++++++---------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 0770aca..f539b60 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -2,8 +2,25 @@ # this is not /bin/bash, so "echo -e" is not supported, but the default when calling "echo" +prepare_tempdir () +{ # prepare temporary directory by filling it with the contents of our download folder + # Now we'll copy the content of the X2Go-live-download folder to our tempdir + # this is so we can run wget in update mode (-N) or rsync without needing + # write access to our boot medium (write access means increased wear and tear, + # and we want to avoid that especially for media that has no wear-leveling + # like CF cards) + # + echo -n "\n$(date +'%F | %T | ')'$0': Preparing tempdir ..." + while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do + echo -n "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." + sleep 30 + echo -n "\n$(date +'%F | %T | ')'$0': Retrying ..." + done + echo " done." +} + check_timestamp () -{ #this attempts to download a timestamp file +{ # this attempts to download a timestamp file echo -n "\n$(date +'%F | %T | ')'$0': starting timestamp download ..." if ! $DOWNLOADCOMMANDFORTIMESTAMP; then return 1 @@ -17,7 +34,7 @@ check_timestamp () } show_versions () -{ # This prints the TCE versions that are stored on the local medium to the log output +{ # this prints the TCE versions that are stored on the local medium to the log output LISTOFTIMESTAMPFILES=$(find /lib/live/mount/findiso/boot -name "x2go-tce-timestamp") if [ -n "$LISTOFTIMESTAMPFILES" ]; then echo -n "\n$(date +'%F | %T | ')'$0': List of locally stored TCE versions:" @@ -269,22 +286,6 @@ echo -n " live-autoupdater (backgrounding update task)" OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME") DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/") - - # Now we'll copy the content of the X2Go-live-download folder to our tempdir - # this is so we can run wget in update mode (-N) or rsync without needing - # write access to our boot medium (write access means increased wear and tear, - # and we want to avoid that especially for media that has no wear-leveling - # like CF cards) - # - echo -n "\n$(date +'%F | %T | ')'$0': Preparing tempdir ..." - while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do - echo -n "\n$(date +'%F | %T | ')'$0': Sleeping 30 seconds ..." - sleep 30 - echo -n "\n$(date +'%F | %T | ')'$0': Retrying ..." - done - echo " done." - - # Now let's figure out if we're supposed to use wget or rsync for downloading # if echo "$DOWNLOADURL" | grep -q "^http" || \ @@ -295,16 +296,17 @@ echo -n " live-autoupdater (backgrounding update task)" $DOWNLOADURL/x2go-tce-timestamp" check_timestamp - if [ $? -eq 1 ]; then + CTRC=$? + if [ $CTRC -eq 1 ]; then echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." - elif [ $? -eq 5 ]; then + elif [ $CTRC -eq 5 ]; then cleanup echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium else - : # NOP + prepare_tempdir fi # Attempt to determine available bandwidth & to set BWLIMIT accordingly @@ -349,16 +351,17 @@ echo -n " live-autoupdater (backgrounding update task)" $TEMPDIR" check_timestamp - if [ $? -eq 1 ]; then + CTRC=$? + if [ $CTRC -eq 1 ]; then echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." - elif [ $? -eq 5 ]; then + elif [ $CTRC -eq 5 ]; then cleanup echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." return 0 # current is newest, nothing to do, we want to avoid # unneccessary writes to the medium else - : # NOP + prepare_tempdir 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
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 952c02ddd7ad91a886a0dced1abd3280b5c5cecf Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 17:04:29 2017 +0200 make sure to match to end of line only --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 0b27b31..2e749ee 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -12,7 +12,7 @@ show_versions () echo "$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(dirname $TIMESTAMPFILE)) $(cat $TIMESTAMPFILE) - $(date --date=@$(cat $TIMESTAMPFILE))" done - sed -i "s/$RUNNINGSYSTEMNAME;/$RUNNINGSYSTEMNAME;X/i" /var/run/x2go-tce-timestamps + sed -i "s/$RUNNINGSYSTEMNAME;$/$RUNNINGSYSTEMNAME;X/i" /var/run/x2go-tce-timestamps echo "---- END TIMESTAMPS ----" >>/var/run/x2go-tce-timestamps 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
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 a8a743a54409fa57314d66b5fbf1a0e8fb65f241 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 17:03:54 2017 +0200 changed logfile format --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index ef504af..0b27b31 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -9,10 +9,10 @@ show_versions () echo -n "\n$(date +'%F | %T | ')'$0': List of locally stored TCE versions:" echo "--- BEGIN TIMESTAMPS ---" >/var/run/x2go-tce-timestamps for TIMESTAMPFILE in $LISTOFTIMESTAMPFILES; do - echo ";;$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps + echo "$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(dirname $TIMESTAMPFILE)) $(cat $TIMESTAMPFILE) - $(date --date=@$(cat $TIMESTAMPFILE))" done - sed -i "s/;$RUNNINGSYSTEMNAME/X;$RUNNINGSYSTEMNAME/i" /var/run/x2go-tce-timestamps + sed -i "s/$RUNNINGSYSTEMNAME;/$RUNNINGSYSTEMNAME;X/i" /var/run/x2go-tce-timestamps echo "---- END TIMESTAMPS ----" >>/var/run/x2go-tce-timestamps 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
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 3ab4f807b559bb53ad4e1441cfa2fb6828d73776 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 20:17:27 2017 +0200 fixed a copy-paste-induced error --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 1 - 1 file changed, 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b707e30..332b872 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -365,7 +365,6 @@ echo -n " live-autoupdater (backgrounding update task)" : # NOP fi prepare_tempdir - fi # Attempt to determine available bandwidth & to set BWLIMIT accordingly -- 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
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 c5a258b182ce85e0355398f4e9e5ad934bc46faf Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 19:08:21 2017 +0200 tempdir preparation only needs to take place if we need to perform an update or if checking the timestamp failed. Also, indentation was wrong. --- .../lib/live/config/2400-live-autoupdate | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index f539b60..b707e30 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -298,16 +298,17 @@ echo -n " live-autoupdater (backgrounding update task)" check_timestamp CTRC=$? if [ $CTRC -eq 1 ]; then - echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." + echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." elif [ $CTRC -eq 5 ]; then - cleanup - echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." - echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." - return 0 # current is newest, nothing to do, we want to avoid - # unneccessary writes to the medium + cleanup + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." + echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium else - prepare_tempdir + : # NOP fi + prepare_tempdir # Attempt to determine available bandwidth & to set BWLIMIT accordingly echo -n "\n$(date +'%F | %T | ')'$0': Attempting to determine available bandwidth for wget.\n" @@ -353,15 +354,17 @@ echo -n " live-autoupdater (backgrounding update task)" check_timestamp CTRC=$? if [ $CTRC -eq 1 ]; then - echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." + echo -n "\n$(date +'%F | %T | ')'$0': an error occurred during timestamp download; trying full download instead ..." elif [ $CTRC -eq 5 ]; then - cleanup - echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." - echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." - return 0 # current is newest, nothing to do, we want to avoid - # unneccessary writes to the medium + cleanup + echo -n "\n$(date +'%F | %T | ')'$0': Nothing to do. - Files on server not newer than '$RUNNINGSYSTEMNAME'." + echo -n "\n$(date +'%F | %T | ')'$0': ('$RUNNINGSYSTEMNAME' is Version $RUNNINGVERSION - $(date --date=@$RUNNINGVERSION))." + return 0 # current is newest, nothing to do, we want to avoid + # unneccessary writes to the medium else - prepare_tempdir + : # NOP + fi + prepare_tempdir 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
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 30a97c520ad756845740df2af4cdbe36a48ab3f4 Merge: 3020af6 534bd12 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Aug 2 16:01:04 2017 +0200 Merge changes to config/includes.chroot/lib/live/config/ from feature/openbox into feature/mate-minidesktop. .../includes.chroot/lib/live/config/2000-settime | 48 ++ .../lib/live/config/2100-show-sysconf | 71 +- .../lib/live/config/2250-getsshpubkeysfromserver | 63 +- .../lib/live/config/2300-xserver-xorg-getxorgconf | 60 +- .../lib/live/config/2400-live-autoupdate | 851 ++++++++++++--------- .../includes.chroot/lib/live/config/2600-tcpprint | 18 +- .../lib/live/config/2700-x2go-getsessions | 60 +- 7 files changed, 716 insertions(+), 455 deletions(-) -- 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
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 534bd126ea802375cfaeae8e4fb2ae84b7220122 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Jul 27 12:50:53 2017 +0200 booted env and build version should go to motd, too --- config/includes.chroot/lib/live/config/2100-show-sysconf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index f3cf38b..8354c71 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -53,8 +53,8 @@ fi IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ) echo "\$IPMSG" | tee -a /etc/motd >> /etc/issue - [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" >> /etc/issue - [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" >> /etc/issue + [ -n "\$BOOTEDENV" ] && echo "- Booted Environment: \$BOOTEDENV" | tee -a /etc/motd >> /etc/issue + [ -n "\$TIMESTAMP" ] && echo "- Build Version: \$TIMESTAMP (\$HUMANTIMESTAMP)" | tee -a /etc/motd >> /etc/issue # make sure all unused VTs show the new /etc/issue ps -C getty --no-header | awk '{ print \$1 }' | xargs -n 1 kill -1 -- 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
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 3020af684a2681b6c76d012c7be7b0a7cd68da25 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jul 26 22:17:37 2017 +0200 renamed files to be consistent with branch feature/openbox --- .../lib/live/config/{2000-showifconfig => 2100-show-sysconf} | 0 config/includes.chroot/lib/live/config/{2100-lockuser => 2200-lockuser} | 0 .../config/{2150-getsshpubkeysfromserver => 2250-getsshpubkeysfromserver} | 0 .../{2200-xserver-xorg-getxorgconf => 2300-xserver-xorg-getxorgconf} | 0 .../lib/live/config/{2300-live-autoupdate => 2400-live-autoupdate} | 0 ...{2400-x2go-getportableappsessions => 2500-x2go-getportableappsessions} | 0 ...-getopensshportableclientkey => 2510-x2go-getopensshportableclientkey} | 0 config/includes.chroot/lib/live/config/{2500-tcpprint => 2600-tcpprint} | 0 .../lib/live/config/{2600-x2go-getsessions => 2700-x2go-getsessions} | 0 .../config/{2700-x2go-powerbuttonmonitor => 2800-x2go-powerbuttonmonitor} | 0 10 files changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2100-show-sysconf similarity index 100% rename from config/includes.chroot/lib/live/config/2000-showifconfig rename to config/includes.chroot/lib/live/config/2100-show-sysconf diff --git a/config/includes.chroot/lib/live/config/2100-lockuser b/config/includes.chroot/lib/live/config/2200-lockuser similarity index 100% rename from config/includes.chroot/lib/live/config/2100-lockuser rename to config/includes.chroot/lib/live/config/2200-lockuser diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver similarity index 100% rename from config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver rename to config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver diff --git a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf similarity index 100% rename from config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf rename to config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate similarity index 100% rename from config/includes.chroot/lib/live/config/2300-live-autoupdate rename to config/includes.chroot/lib/live/config/2400-live-autoupdate diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions similarity index 100% rename from config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions rename to config/includes.chroot/lib/live/config/2500-x2go-getportableappsessions diff --git a/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey b/config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey similarity index 100% rename from config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey rename to config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint similarity index 100% rename from config/includes.chroot/lib/live/config/2500-tcpprint rename to config/includes.chroot/lib/live/config/2600-tcpprint diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions similarity index 100% rename from config/includes.chroot/lib/live/config/2600-x2go-getsessions rename to config/includes.chroot/lib/live/config/2700-x2go-getsessions diff --git a/config/includes.chroot/lib/live/config/2700-x2go-powerbuttonmonitor b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor similarity index 100% rename from config/includes.chroot/lib/live/config/2700-x2go-powerbuttonmonitor rename to config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor -- 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
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 e24053d2d559923cedca763ac6d62f4413e0293d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Jul 27 01:47:13 2017 +0200 nvertedsequence of timestamp and envname, fixes problem that marker for active env isn't set, also, easier on the eyes --- config/includes.chroot/lib/live/config/2400-live-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 332b872..fbb7b60 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -40,7 +40,7 @@ show_versions () echo -n "\n$(date +'%F | %T | ')'$0': List of locally stored TCE versions:" echo "--- BEGIN TIMESTAMPS ---" >/var/run/x2go-tce-timestamps for TIMESTAMPFILE in $LISTOFTIMESTAMPFILES; do - echo "$(basename $(dirname $TIMESTAMPFILE));$(cat $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps + echo "$(basename $(cat $TIMESTAMPFILE));$(dirname $TIMESTAMPFILE);" >>/var/run/x2go-tce-timestamps echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(dirname $TIMESTAMPFILE)) $(cat $TIMESTAMPFILE) - $(date --date=@$(cat $TIMESTAMPFILE))" done sed -i "s/$RUNNINGSYSTEMNAME;$/$RUNNINGSYSTEMNAME;X/i" /var/run/x2go-tce-timestamps -- 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
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 ae589ab81513c659200672fa7e30e47100612f31 Merge: f6e19be 0202789 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 19 21:30:10 2017 +0100 Merge branch 'feature/openbox' into feature/mate-minidesktop Conflicts: config/package-lists/x2go.list.chroot .../lib/live/config/2100-show-sysconf | 8 +- .../lib/live/config/2250-getsshpubkeysfromserver | 14 +- .../lib/live/config/2260-getsshhostkeysfrommedia | 119 +++++++++++ .../lib/live/config/2270-getsshclientkeysfrommedia | 118 ++++++++++ .../lib/live/config/2300-xserver-xorg-getxorgconf | 14 +- .../lib/live/config/2400-live-autoupdate | 38 ++-- .../config/2510-x2go-getopensshportableclientkey | 46 ---- .../includes.chroot/lib/live/config/2600-tcpprint | 6 +- .../lib/live/config/2700-x2go-getsessions | 14 +- .../lib/live/config/2710-x2go-getbranding | 61 ++++++ .../lib/live/config/2720-x2go-getbg | 61 ++++++ .../lib/live/config/2900-x2go-thinclientconfig | 237 +++++++++++++++++++++ config/package-lists/live.list.chroot | 1 + config/package-lists/utils.list.chroot | 3 + config/package-lists/x2go.list.chroot | 14 +- config/rootfs/excludes | 4 + 16 files changed, 663 insertions(+), 95 deletions(-) diff --cc config/package-lists/x2go.list.chroot index 8e0fdff,06e85dc..3e92872 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@@ -1,8 -1,6 +1,9 @@@ cryptsetup +firefox-esr +firefox-esr-l10n-de +flashplugin-nonfree freerdp-x11 + iso-codes libfile-path-expand-perl libfreerdp-cache1.1 libfreerdp-client1.1 @@@ -53,4 -52,10 +55,12 @@@ pulseaudio-module-x1 pulseaudio-utils rdesktop udev + x2goclient ++x2gothinclient-minidesktop ++x2gothinclient-usbmount + x2gousbmount + xfonts-75dpi + xfonts-scalable + xnest + xserver-xephyr zlib1g -- 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
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 7df4f1ad694557733cce116f55d88c93f234a42a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 5 15:57:56 2017 +0100 commented out i386-only package (geode Xorg driver) --- config/package-lists/desktop.list.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/package-lists/desktop.list.chroot b/config/package-lists/desktop.list.chroot index 05b736b..cf7027d 100644 --- a/config/package-lists/desktop.list.chroot +++ b/config/package-lists/desktop.list.chroot @@ -2,7 +2,7 @@ x11vnc x11vnc-data xserver-xorg-input-wacom xserver-xorg-video-all -xserver-xorg-video-geode +# for i386 only #xserver-xorg-video-geode xserver-xorg-video-qxl xserver-xorg xterm -- 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
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 f6e19bec2de9df8e338193ed6dc9e850fedd807d Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 19 21:06:21 2017 +0100 deleted two files that are now identical in x2gothinclient-minidesktop --- .../020_x2gothinclient-confine-to-tray | 29 ---------------------- .../030_x2gothinclient-inject-tcmode | 25 ------------------- 2 files changed, 54 deletions(-) diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray deleted file mode 100755 index b8d3210..0000000 --- a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2010-2015 by X2Go project, http://wiki.x2go.org -# Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> -# Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de> -# Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - -# X2Go is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# X2Go is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -if [ -z "$X2GO_HANDLE_DAEMON" ] ; then - mkdir -p ~x2gothinclient/.x2goclient - echo '[trayicon]' >>~x2gothinclient/.x2goclient/settings - echo 'enabled=true' >>~x2gothinclient/.x2goclient/settings - chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf - chmod go-rwx ~x2gothinclient -Rf -fi diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode deleted file mode 100755 index b790254..0000000 --- a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2010-2015 by X2Go project, http://wiki.x2go.org -# Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> -# Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de> -# Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - -# X2Go is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# X2Go is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -if [ -z "$X2GO_HANDLE_DAEMON" ] ; then - sed -i -e "\#^/usr/lib/x2go/x2goclient#a\\\t\\t\\t --thinclient \\\\" /etc/x2go/x2gothinclient-minidesktop_start -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
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 f4d888db339e1af7fad76be85546e226d046aca3 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 19 21:52:45 2017 +0100 mate-minidesktop is built from heuler, so it needs the new package name for x2go(thinclient-)usbmount. Also, all mate-minidesktop-related packages go into their own package.list file now, so x2go.list.chroot can always be merged from one of the openbox branches --- config/package-lists/mate-minidesktop.list.chroot | 5 +++++ config/package-lists/x2go.list.chroot | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/package-lists/mate-minidesktop.list.chroot b/config/package-lists/mate-minidesktop.list.chroot new file mode 100644 index 0000000..871673d --- /dev/null +++ b/config/package-lists/mate-minidesktop.list.chroot @@ -0,0 +1,5 @@ +firefox-esr +firefox-esr-l10n-de +flashplugin-nonfree +x2gothinclient-minidesktop +x2gothinclient-usbmount diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index 3e92872..06e85dc 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -1,7 +1,4 @@ cryptsetup -firefox-esr -firefox-esr-l10n-de -flashplugin-nonfree freerdp-x11 iso-codes libfile-path-expand-perl @@ -56,8 +53,6 @@ pulseaudio-utils rdesktop udev x2goclient -x2gothinclient-minidesktop -x2gothinclient-usbmount x2gousbmount xfonts-75dpi xfonts-scalable -- 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
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 adac24468105d1b80acac14c9a6f4674cd55bbef Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 19 23:37:59 2017 +0100 Revert "deleted two files that are now identical in x2gothinclient-minidesktop" (seems to have been a mistake) This reverts commit f6e19bec2de9df8e338193ed6dc9e850fedd807d. --- .../020_x2gothinclient-confine-to-tray | 29 ++++++++++++++++++++++ .../030_x2gothinclient-inject-tcmode | 25 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray new file mode 100755 index 0000000..b8d3210 --- /dev/null +++ b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/020_x2gothinclient-confine-to-tray @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (C) 2010-2015 by X2Go project, http://wiki.x2go.org +# Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> +# Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de> +# Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + +# X2Go is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# X2Go is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +if [ -z "$X2GO_HANDLE_DAEMON" ] ; then + mkdir -p ~x2gothinclient/.x2goclient + echo '[trayicon]' >>~x2gothinclient/.x2goclient/settings + echo 'enabled=true' >>~x2gothinclient/.x2goclient/settings + chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf + chmod go-rwx ~x2gothinclient -Rf +fi diff --git a/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode new file mode 100755 index 0000000..b790254 --- /dev/null +++ b/config/includes.chroot/etc/x2go/x2gothinclient_init.d/030_x2gothinclient-inject-tcmode @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright (C) 2010-2015 by X2Go project, http://wiki.x2go.org +# Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> +# Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de> +# Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + +# X2Go is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# X2Go is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +if [ -z "$X2GO_HANDLE_DAEMON" ] ; then + sed -i -e "\#^/usr/lib/x2go/x2goclient#a\\\t\\t\\t --thinclient \\\\" /etc/x2go/x2gothinclient-minidesktop_start +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