This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/openbox-magic-pixel-workaround in repository live-build-x2go. at e4c3ad6 Changed openbox spawn/terminate conditions: only exactly 3 windows mean that openbox should be terminated. Any less, and we're in "no running session yet" state, any more, and we have a running session, and e.g. a connection loss popup. This branch includes the following new commits: new 5717c54 make sure Alt-F4 is non-functional new d1bd579 off-by-one-error new a145da3 trying to shrink the image; note: squashfs excludes must not begin with "/", "./", or "../" when using wildcards new af17804 trying to fix "cifs-utils not found" error when building netboot image while deleting apt lists to save space new bcd4a8d OpenBox Keybindings need to be disabled entirely, they interfere with Xephyr and the like. new f07c782 2800-x2go-thinclientconfig: added quotation marks new 7593795 more reliable way of determining that IP has been assigned new 8622a83 more reliable way of determining that IP has been assigned new a8896be more reliable way of determining that IP has been assigned new 372ca24 added output: when sleeping while waiting for an IP, print out which script is waiting. new 1717d3f 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 5ea99bf added numbers to if-up.d script file names so we can enforce the sequence of execution new 707079e 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 5a6ed83 attempt to background all network-related tasks new c636bf0 fixes missing escape -> hostname -I was never executed new 55cda68 Variable name was wrong in one place new 65b0fbd un-did backgrounding new d3948cd changed script numbering to four-digit, beginning with 0100 new 73735c2 added timestamps to log output, fixed log output in 2200 and 2600 new 89fa571 added timestamps, switched log output to | tee -a /dev/tty9 like in the other scripts new f6aaea7 escape sign wass missingonce again ... new 422f930 improved log output new e22dff9 last commit was incomplete, and included one escape too much per echo new cf1039a and again, missing escapes new 3bb4053 indentation was wrong new 18722b5 more missing escapes new 53b398b more superfluous escapes removed new e6732ca tty9 -> tty(first unused VT) new 0dfe71d removed old commented-out code new aebc352 switched liveupdate to tty(next-available-VT) logging and timestamped output new 49ea9e3 some log output was still lacking the timestamp new c2be7ea improved ramdisk size calculation new 9893aaf removed wrong comment new f658f73 moved "wait until unused VT becomes available" from 2300 to 2000 new 7a360f3 added hwclock and ntpdate packages for future use in a set-time-on-boot script new 5e36ff5 hwclock is not a package on its own, but contained in util-linux new b933d9b renamed files to make space for a new 2000- file new 179e461 renamed files; delete old names from git new e6b46fb first attempt at making all if-up scripts wait until an unused VT is available for log output new 8959b62 removed "wait for VT" block, as it is now in a separate script new 5c1fc2d no timestamp here, as clock is most likely wrong new 239943c added time setting script new cdac40c fixed HEREDOCs new fe2c67d create debug output in file new 1e02593 logging was still broken new e2cf76c next try: backgrounding this task instead of starting it when network becomes available new 1491b5c yet another attempt at getting logging to work new 672e387 if-up scripts should exit with a NOP when a local network device is changing to up, rather than a real network device new 04a2e41 removed unused code new 31a2d8c deleted script file that didn't work anyways new a05d6e4 renamed settime script new 6715a01 all if-up tasks are now sent into the background and told to wait until tty becomes available also, fixed indention in tcpprint new a151c55 removed unneccessary escapes new 2a82236 added missing escapes new 611cae0 do not clear the console new 562d6fb /bin/sh instead of /bin/bash requires the use of "echo" instead of "echo -en" new 13ddd00 wait until regular ntpdate if-up.d call has finished new 56b5252 added debug output new 8ed71b9 autoupdate-patch for ramdisk mode new 3bc7c4f do not trigger on METHOD="none" (which is set when IFACE="--all") new d3169f6 typofix new e713cf3 added debug code again new 4293e3e changed log output message new 5e7445d typofix new f9e3abb path was wrong new 7e4ed7e added resiliency in case download directory is missing, fixed imagesize calculation new 19b3aee added sleep to increase chance that ntpdate manages to connect new 759ab5c IMGSIZEDOWNLOAD was missing a filter that limits its content to $1 (awk-style) new b50808f improved logging, added error detection for mount process new 91b63bc increased log output new 1e46e40 expanded logging, changed log messages new 5128db6 inserted proper umount/remount_ro -> moved into subroutine, as req'd in two places new e23269d removed a cleanup command that would umount /lib/live/mount/findiso when in ramdisk mode, which is a stupid thing to do new 6932c2f when trying to find the right storage device to deploy an update to in ramdisk mode, use read-only mounts at first new ffbb173 using mv would accumulate clutter in $DOWNLOADPATH if any extra files are present in the source; switched to rsync --delete and rm instead new ef53cf3 only rm if rsync was successful new 22ae4ad improved logging new c2b44f2 /bin/sh seems to insist on blank between { and # new 0259692 improved logging new 0f3306f only attempt umount when path is a mounted device / improved logging new dd203b1 in ramdisk mode, storage should be umounted at the end of an (attempted) upgrade new 760846a in /bin/sh, echo -en is not supported, but echo -n is and should thus be used new 464b891 mproved logging: bandwidth test should now output progress bar. new b856d19 added version and booted system info output, indentation fixed new 1b6d0c2 renamed file to better represent what it does new 5bd4fdf added steps to further reduce clutter buildup, changed/improved logging new 8226035 make autoupdater show available versions before and after update new 4097290 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 ce839fc typofix new 8ba13dd more typofixes new 58f4777 write timestamps to text file, for easier querying by checkscripts new 8a2e30d logfile will now also contain which environment is the running one new 8314ccb added code to check timestamp before download new 169e110 typofix new 5c4ad21 mountpoint detection must come earlier in the script, or MOUNTPOINT variable will be empty when it's already needed by other script parts new ebc9bd4 variable name was wrong new bed2b4f speed optimization, also addedoutputto /var/run/banner where ssh should pick it up new f952248 further speed improvements, also, enable banner in sshd config if it was disabled new 7b49458 looks like debian-live doesn't use /var/run/banner new 0194f06 we need to strip the ANSI as it doesn't work in issue.net via SSH new 3b5fab2 test: use motd instead of issue.net new d3d9773 switched to motd instead of issue.net, removed motd display from pam login so it doesn't appear twice on local login new 42a78b7 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 40a568a changed logfile format new 20f5120 make sure to match to end of line only new 10d7219 timestamp is now checked before BWLIMIT is determined -> faster, less traffic new 464c22a 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 ea4d294 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 c9cf762 fixed a copy-paste-induced error new 905088f nvertedsequence of timestamp and envname, fixes problem that marker for active env isn't set, also, easier on the eyes new 6de169e booted env and build version should go to motd, too new d79a8cd reversed order of timestamping output; fixed error in related logfile content creation new 69234c8 added code to support background and branding parameters new 72f4a63 fixed missing escapes new d7b5526 fixed more missing escapes new fc63b02 syntax fixes new 53586c8 syntax fix new 208e8cd inverted if condition, no need for a "!" here ... new 1489ecc syntax fix new 0885946 fixed an error that kept Xinerama from working (would always clone screens instead) new dd76ab4 fixed regression that would allow right-click context menu again new 6732bcb make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient new 8a4d855 added support to preselect session via boot parameter new 183261a syntax fix new 2704523 commented out i386-only package (geode Xorg driver) new b64dbb8 replaced tr ' ' '\n' with the more elaborate sed -e 's/ \([^ ]*\)=/\n\1=/g' to catch blanks in values new c9ec6a9 added support for blanks in session names (no quotes required in parameter) new 4e86e77 replaced tr ' ' '\n' with the more elaborate sed -e 's/ \([^ ]*\)=/\n\1=/g' to catch blanks in values new 755b4f9 added filters and quotes for some additional security, added missing escapes new 75f7968 fixed overzealous filter new 3182872 syntaxfix new 84d1c06 quoting fixed new 0944a64 fix to display timestamp/version information regardless of squashfs file name new 54a4354 fixed useless use of cat made sure double/single quotes work for parameters with spaces new fe5a07e added trickle package, to limit bandwidth usage; added bandwidth throttling code: single throttle value limits upstream; if multiple values are specified, first is upstream, second is downstream new c94fd94 changed throttling code so it allows for "unlimited" values by specifying "u" instead of a number new 8b6ca5d rearranged detection sequence of throttling commands, also, rearranged parameter sequence to match trickle defaults: -d -u -t -l -L; Added code to determine maximum line speed for "u" values new 39070ec added comments explaining default values new 7515680 fixed missing escapes new 225b4c9 added workaround for NX "magic pixel" being active in --thinclient mode new 767520f changed file name as it didn't contain ".list" and thus seems to have been ignored new d9ae0c9 workaround wasn't working, swapped out for now-working code new 6799f3f fixed missing escape (when will I ever learn ...) new 8d58936 added script to add and store SSH host keys when proper media is present new 020c4e2 renamed 2510-x2go-getopensshportableclientkey -> 2270-getsshclientkeysfrommedia as the contents have been changed to a more generic form - it is now no longer specific to X2Go new ca52885 make sure file permissions are correct, even when copying from vfat; make sure all keys are generated before storing on media new c62e517 executable bit was missing new 1c382d7 fixed syntax error stemming from copypasta new ce0d2b4 dash's echo does not understand -e, thus removed new 4ed72eb backgrounded entire task, added error checks and log output new baa5147 removed unneccessary escapes new 0d41297 added umount command for self-mounted devices new 2851291 separate umount added, for when the condition isn't matched new d7bdc27 added "finished" marker new d7df252 added check for already-running sshd new bcacbef changed routine to be more like GetSSHHostKeysFromMedia, also, added check so it waits until GetSSHHostKeysFromMedia is done new 7daa959 wildcards were missing for additional directories new fc711b9 added checks so only keyfiles are copied new e7f23a1 added check so key copy routine only runs when "copysecring" boot parameter is set new a45f251 temporary x2go archive path change due to server maintenance new bd7a9e7 added '@' as allowed character in broker URL, sessionselect, and LDAP parameters new bb1e83f added libfreerdp-plugins-standard so drive forwarding works with xfreerdp new 3fe907a added required dependencies for previously added package new bdb41cd undid commit a45f251bddf68e498dbbcceb638be45c26c4a96e as repo is up again new 915391f Parameter nomagicpixel=1 or nomagicpixel=2 must now be set as kernel boot parameter to enable the magic-pixel-workaround. Also added alternative method to disable magic pixel. Old method is now option 2. new de9ec56 once again, fixed missing escapes, le sigh new e4c3ad6 Changed openbox spawn/terminate conditions: only exactly 3 windows mean that openbox should be terminated. Any less, and we're in "no running session yet" state, any more, and we have a running session, and e.g. a connection loss popup. The 167 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5717c54094c4317c345ac514f3c5dda056139f1f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Feb 25 12:37:53 2017 +0100 make sure Alt-F4 is non-functional --- config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig index 2bb146b..e576baa 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig @@ -12,6 +12,8 @@ echo -n " x2go-thinclientconfig" 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 +# disable OpenBox Alt-F4 +sed -i -e '/<keybind key="A-F4">/,+3d' /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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit a145da38b12be11ac781ffef01a27d6b962d726c Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 26 18:00:29 2017 +0100 trying to shrink the image; note: squashfs excludes must not begin with "/", "./", or "../" when using wildcards --- config/rootfs/excludes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/rootfs/excludes b/config/rootfs/excludes new file mode 100644 index 0000000..58dacc4 --- /dev/null +++ b/config/rootfs/excludes @@ -0,0 +1,4 @@ +usr/share/doc/* +usr/share/locale/* +usr/share/man/* +var/lib/apt/lists/* -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit af178043779055e39f1d96705a7b0d7adc63325b Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 26 18:01:17 2017 +0100 trying to fix "cifs-utils not found" error when building netboot image while deleting apt lists to save space --- config/package-lists/live.list.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/config/package-lists/live.list.chroot b/config/package-lists/live.list.chroot index ca96ff1..5972111 100644 --- a/config/package-lists/live.list.chroot +++ b/config/package-lists/live.list.chroot @@ -1,3 +1,4 @@ +cifs-utils console-setup console-setup-linux fuse -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d1bd57950eadb97b3e238f8720cee170194ff9b9 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Feb 25 13:47:40 2017 +0100 off-by-one-error --- config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig index e576baa..93f45a7 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig @@ -13,7 +13,7 @@ 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 # disable OpenBox Alt-F4 -sed -i -e '/<keybind key="A-F4">/,+3d' /etc/xdg/openbox/rc.xml +sed -i -e '/<keybind key="A-F4">/,+2d' /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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit bcd4a8de7e551765abf67d3e52c094d11b57ad87 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Feb 26 18:02:54 2017 +0100 OpenBox Keybindings need to be disabled entirely, they interfere with Xephyr and the like. --- config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig index 93f45a7..981e002 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig @@ -10,10 +10,9 @@ 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 -# disable OpenBox Alt-F4 -sed -i -e '/<keybind key="A-F4">/,+2d' /etc/xdg/openbox/rc.xml +# disable OpenBox keyboard bindings +# this also disables the context menu (would be accessible in xinerama) and things like Alt-F4 for X2GoClient, Xephyr, etc. +sed -i -e '/<keyboard>/,/<\/keyboard>/{//!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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 372ca24879d1a0570ce926b3db08e66d7ca4a401 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit f07c782001e48c8783a1f8e904df01b3f8ba6d25 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Apr 24 16:17:40 2017 +0200 2800-x2go-thinclientconfig: added quotation marks --- config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig index 981e002..0aca654 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig @@ -60,7 +60,7 @@ for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' # 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 [ -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, -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1717d3fc7e16130a6fa514d105dac857bf3ddbff 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 +++ config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig | 7 +++++++ 2 files changed, 10 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 diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig index 0aca654..87fbae9 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig @@ -107,6 +107,13 @@ if [ -n "\$BROKERURL" ]; then SESSIONFROM="--broker-url=\$BROKERURL" else SESSIONFROM="--session-conf=/etc/x2go/x2gothinclient_sessions" + while ! [ -s /etc/x2go/x2gothinclient_sessions ]; do + OLDCON=$(fgconsole) + chvt 1 + echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." + sleep 2 + done + [ -n "$OLDCON" ] && chvt $OLDCON fi if [ -n "\$LDAP" ] ; then if [ -n "\$LDAP1" ] ; 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8622a8319d5d04b96cd8b3fdd1e06a163c70f0e6 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 7593795b56371657d79d752de6bb18a1c74aaf92 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit a8896be7b9cb8a995eeac7761891063922b2c1da 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5a6ed8379a37e173192e8acfcfe21c494fe21e09 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c636bf07acbfd6760fdad7e40a974e8647d410e5 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 707079e2d790916ced342ff01560a778bd032c71 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 65b0fbdfab5cf9b186be601a75f097799e053d5e 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5ea99bfc8c43d80d6874277155fc77354e0d6f06 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 55cda689e5f6a866ebdf6438e29f518fa3860b95 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit cf1039ab63f06d8839ad2b21000aa540a70edd3d 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit f6aaea7ae38a68cfefe1ce316b06c0899e0ce96e 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e22dff99714c1230e259b6a4d09203f49410f24b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 422f930b1d36ac0cdbb31ed31689c3280d96a4a9 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 89fa571181754d388bed467b86859f7caf2311df 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 73735c29bdbd21fa6b32622fb1aa7262c843c4d0 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d3948cd693ec8bea9554096c90c3eb9e15dda570 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 3bb4053daa424db4774039ca1f638e19a4387a61 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 18722b5e87cfb40ba232ea9a20dc700ef1ec1941 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit aebc352fe5de5a21e3ecdfb4958118a84980e338 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 53b398be26973d54ef98ef7dcd73412c451cc0d0 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 0dfe71d72ab4ba3e2ad3ed423b5a60510f482a5f 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e6732ca5fb0618f9891ca613423285d586af56ba 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 49ea9e3b0019f8fb81dde4f9c04cb676e0e56603 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c2be7eab68f74aaf4bea76436f61cff88dca317c 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 9893aafb2e5ee46a77ab4cabfe2a72b5c9debf65 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit f658f737a3e90828db973a5026e08aff1fb0254e 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 7a360f35fdae01063aae6bdf5305793a7e4ea12c Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 13:10:28 2017 +0200 added hwclock and ntpdate packages for future use in a set-time-on-boot script --- config/package-lists/utils.list.chroot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/package-lists/utils.list.chroot b/config/package-lists/utils.list.chroot index 27d8716..2eda261 100644 --- a/config/package-lists/utils.list.chroot +++ b/config/package-lists/utils.list.chroot @@ -2,7 +2,9 @@ acpid acpi-support atftp ca-certificates +hwclock kbd +ntpdate openssh-client openssh-server openssh-sftp-server -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5e36ff5100341566e3975dc32980ba537c027fd0 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sun Jul 23 13:44:30 2017 +0200 hwclock is not a package on its own, but contained in util-linux --- config/package-lists/utils.list.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/package-lists/utils.list.chroot b/config/package-lists/utils.list.chroot index 2eda261..930954e 100644 --- a/config/package-lists/utils.list.chroot +++ b/config/package-lists/utils.list.chroot @@ -2,7 +2,6 @@ acpid acpi-support atftp ca-certificates -hwclock kbd ntpdate openssh-client @@ -12,6 +11,7 @@ openssl psmisc rsync screen +util-linux vim wget xinetd -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 179e4615ff21812700965ea1ff77a3ab7b74e4ff 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 --- .../lib/live/config/2700-x2go-powerbuttonmonitor | 13 - .../lib/live/config/2800-x2go-thinclientconfig | 162 -------- 11 files changed, 971 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 diff --git a/config/includes.chroot/lib/live/config/2700-x2go-powerbuttonmonitor b/config/includes.chroot/lib/live/config/2700-x2go-powerbuttonmonitor deleted file mode 100755 index 8f21eaf..0000000 --- a/config/includes.chroot/lib/live/config/2700-x2go-powerbuttonmonitor +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -X2GoPowerbuttonMonitor () -{ -# Output startup message -# -echo -n " x2go-powerbuttonmonitor" - -# Spawn Powerbutton-Monitor -/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; poweroff ; chvt 7) &' -} - -X2GoPowerbuttonMonitor 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 87fbae9..0000000 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ /dev/null @@ -1,162 +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 keyboard bindings -# this also disables the context menu (would be accessible in xinerama) and things like Alt-F4 for X2GoClient, Xephyr, etc. -sed -i -e '/<keyboard>/,/<\/keyboard>/{//!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" - while ! [ -s /etc/x2go/x2gothinclient_sessions ]; do - OLDCON=$(fgconsole) - chvt 1 - echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." - sleep 2 - done - [ -n "$OLDCON" ] && chvt $OLDCON -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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5c1fc2d344fdb1677d32f56ccd48d9c579daa63f 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e6b46fb00a493b67abf7da8b6331fd2755799bd4 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8959b6288785b2336932cb6e51dc58e1f737538a 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit b933d9bfd945e9364cdb20ccb8a8ce63d0a1330d 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 +++ .../lib/live/config/2800-x2go-powerbuttonmonitor | 13 + .../lib/live/config/2900-x2go-thinclientconfig | 162 ++++++++ 11 files changed, 971 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 diff --git a/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor new file mode 100755 index 0000000..8f21eaf --- /dev/null +++ b/config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor @@ -0,0 +1,13 @@ +#!/bin/sh + +X2GoPowerbuttonMonitor () +{ +# Output startup message +# +echo -n " x2go-powerbuttonmonitor" + +# Spawn Powerbutton-Monitor +/bin/bash -c '(while ! [ -f /home/user/.halt ] ; do sleep 1 ; done ; poweroff ; chvt 7) &' +} + +X2GoPowerbuttonMonitor diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig new file mode 100755 index 0000000..87fbae9 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -0,0 +1,162 @@ +#!/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 keyboard bindings +# this also disables the context menu (would be accessible in xinerama) and things like Alt-F4 for X2GoClient, Xephyr, etc. +sed -i -e '/<keyboard>/,/<\/keyboard>/{//!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" + while ! [ -s /etc/x2go/x2gothinclient_sessions ]; do + OLDCON=$(fgconsole) + chvt 1 + echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." + sleep 2 + done + [ -n "$OLDCON" ] && chvt $OLDCON +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/openbox-magic-pixel-workaround in repository live-build-x2go. commit cdac40c6b4f3cfb367f6d43576c609b26ac839a6 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 239943cad715e94da830ff57e4783ab6e9aae816 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit fe2c67d13e0425a67aa0e1eae307af03d1d315b3 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e2cf76cfd76b9e33666d26c0b6f13aba3e9ce6fe 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1491b5c64d3c8433f4af96968431f849212d7ec8 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1e0259317e5249d890d03ec4a70161d7be009d5c 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 672e387e6cd3d8c153a3651d1cc5fe61acd0e3cb 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 31a2d8c4df63b8a1ce5adea56c623343a6fdf265 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit a05d6e4882b69d4d69bb6784a29a6d6bc1be714d 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit a151c55f4f8e1eec6d4875870bac67be513df21b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 611cae0e2c1baddcd39eab84eee05d402dac295c 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 6715a0136f84f92cd09919e0a9c7a51f60d9cc4d 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 2a82236968def13e0cc1e1e6f7193098d93f87e5 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 04a2e41115b94c9e0d2b164fe7fdfe83050e4e03 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 3bc7c4fd190394cb00a1865230970840f6179762 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 562d6fbf0b21cd7de57705885e2623ad316bdb11 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 13ddd00dede35322bbb1bc03905452f1b25b1175 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 56b5252dc4baa68f3794a40a1ac29cb37b120de0 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8ed71b9899e30a5b53e0a469d792b262db44bf9d 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d3169f6028477cd75100a8725acf9b2aaff01467 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 4293e3ea43262fa70bca4c30098db0797c315ef0 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5e7445d468f630ddf9de406cd9eac571fe42dfe9 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e713cf3ae3eb064efecf2d72f1b7adbab1d8e17d 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 7e4ed7e8d583f3ceb8e586245af32b13e6fd505f 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit f9e3abbdb0817aef8245732fcf8abbb74300870b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 759ab5c21fa89410d0744beb27524d5b563604ef 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5128db6217887f2040ae8cc252d395482d428d71 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e23269d7e50712fa7c3288e17e5cce68c12d07f0 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit b50808feb4dd22178c6a8ceb81c63e9c8cdd412e 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 91b63bca162a46e7f8d38064cb65414a0bad0981 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1e46e4032cee466df7e61dd5b82ff4ce7b88de3f 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 19b3aeef2c95ed455900031dbe760f6681040f5d 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c2b44f27a12a806323d2ac46be4b0c0aa8fae82f 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ef53cf3edaefed0be1d84e901c502242cf119c70 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 6932c2f23abe022b25a5af2c9f17c6054aa9196b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ffbb1738f22936b6c9275617875b77c36fe2be00 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 22ae4addf297712ab3c3a68801dc20d3c82664f7 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 02596921de7cebe91f1500fe51e88aa321788715 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 464b89189d46ed3c577b744b5e10ac9ba3c5e431 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit b856d19f3def0b06d356131c2206d2b82aba601b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 760846a40f26787208c673a5a41d25ecde5ebcf9 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 0f3306f02bd5db2f95dae7229a3109201bb813bb 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit dd203b174e76e342c79fa9eafd6cdc4b9f10533c 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 822603568bcbe16df719e60a5bbb196aa2ee1c38 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 4097290df02b087265ff8f3e60778ed619f68b86 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5bd4fdfdf2384d37fcb97338c87b196a2a3ff058 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1b6d0c223cfcc17d4b865888a084c1f4b4fcfca1 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ce839fc1b15316797e1356fea88fe377cc18ae86 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5c4ad21a9366328efdd16a007b6ea2c3cb816797 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8ba13ddfcc328ad07667f6bfe2e9d86dfaff615c 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 58f47778e39986254ab23fc330e4fc366a97db68 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8314ccb7e56d4b970d9202fec150453158ce2c58 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8a2e30d652f8323b3be6c544d14ce7e09882e24a 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 169e110432a74b768dee5be6f99f65a883803da9 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ebc9bd4dce84b0f9b98b2e102a7d6479760fa77e 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit bed2b4fdf95001fe9999c0e52b736aafaa48222b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit f9522485da5a722ff7feaf619d9ed8b9507a4799 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 7b49458b5ad8dd3bb022f3ef87c908263d973a6b 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 0194f065275bcedb558ec98002dae41ee1718c74 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d3d97739f33c7c3925da9e25240cc81a3d271a02 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 3b5fab2e0e31757f064a8a653c6dad997f691bbb 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 42a78b7d05ef4167627d37b61ff97c1a7d759df8 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 10d72197a57e1c105c0ad277cbd228d8231fbc72 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 20f5120e52d13c8ab1c25c4601201b487d1a3351 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 464c22acfe7708f027e6f9eeae6b3e5853c4e9d0 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ea4d29454df55055c2a692b5aa18d19ec658d6e1 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 40a568ab8922e118391368e956e425f252e93921 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 905088fbc6fec16bae37b0e3ef66445d93d97b1a 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c9cf76258862a8fbac13a806620910b52efa123a 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 6de169e673a91805ccb7a21c7ae074e83d885b43 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d79a8cd7476bb904582c90b0a99d2cc0a134714f Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Thu Jul 27 13:55:21 2017 +0200 reversed order of timestamping output; fixed error in related logfile content creation --- 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 fbb7b60..5a8f8ca 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -40,8 +40,8 @@ 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 $(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))" + echo "$(cat $TIMESTAMPFILE);$(basename $(dirname $TIMESTAMPFILE));" >>/var/run/x2go-tce-timestamps + echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(cat $TIMESTAMPFILE) - $(dirname $TIMESTAMPFILE)) - $(date --date=@$(cat $TIMESTAMPFILE))" done sed -i "s/$RUNNINGSYSTEMNAME;$/$RUNNINGSYSTEMNAME;X/i" /var/run/x2go-tce-timestamps echo "---- END TIMESTAMPS ----" >>/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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 69234c80b90553960210dd20c432504b7b219072 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 16:09:51 2017 +0200 added code to support background and branding parameters --- .../lib/live/config/2710-x2go-getbranding | 61 ++++++++++++++++++++++ .../lib/live/config/2720-x2go-getbg | 61 ++++++++++++++++++++++ .../lib/live/config/2900-x2go-thinclientconfig | 29 +++++++++- 3 files changed, 149 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding new file mode 100755 index 0000000..992371e --- /dev/null +++ b/config/includes.chroot/lib/live/config/2710-x2go-getbranding @@ -0,0 +1,61 @@ +#!/bin/sh + +X2GoGetBranding () +{ + # Output startup message + # + echo -n " x2go-getbranding" + + + BRANDINGURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^branding=/ { print $2 }') + BRANDINGDESTINATION=/etc/x2go/branding.svg + + if [ -n "$BRANDINGURL"] ; then + cat >/etc/network/if-up.d/0410-getbranding <<GETBRAND +#!/bin/bash +export TERM=linux; + +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then + exit 0 +fi + +( + 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 + + echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting branding SVG download ..." | tee -a /dev/tty8 + if echo "$BRANDINGURL" | grep -q "^tftp://" ; then + BRANDINGSERVER=$(echo "$BRANDINGURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) + BRANDINGPATH=$(echo "$BRANDINGURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) + if [ -n "\$BRANDINGSERVER" ] && [ -n "\$BRANDINGPATH" ] ; then + while ! atftp \$BRANDINGSERVER -g -r \$BRANDINGPATH -l ${BRANDINGDESTINATION}.tmp ; do + echo -en "\n\$(date +'%F | %T | ')still waiting for branding SVG download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O ${BRANDINGDESTINATION}.tmp $BRANDINGURL ; do + echo -en "\n\$(date +'%F | %T | ')still waiting for branding SVG download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + + echo -en "\n\$(date +'%F | %T | ')'\$0': branding SVG download complete." | tee -a /dev/tty8 + if ! [ -s ${BRANDINGDESTINATION}.tmp ] ; then + mv ${BRANDINGDESTINATION}.tmp $BRANDINGDESTINATION + fi +) & +GETBRAND + chmod 755 /etc/network/if-up.d/0410-getbranding + fi +} + +X2GoGetBranding diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg new file mode 100755 index 0000000..f15cad2 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2720-x2go-getbg @@ -0,0 +1,61 @@ +#!/bin/sh + +X2GoGetBG () +{ + # Output startup message + # + echo -n " x2go-getbg" + + + BGURL=$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^bg=/ { print $2 }') + BGDESTINATION=/etc/x2go/bg.svg + + if [ -n "$BGURL"] ; then + cat >/etc/network/if-up.d/0420-getbg <<GETBG +#!/bin/bash +export TERM=linux; + +if [ "\$METHOD" = "loopback" ] || [ "\$METHOD" = "none" ]; then + exit 0 +fi + +( + 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 + + echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting background SVG download ..." | tee -a /dev/tty8 + if echo "$BGURL" | grep -q "^tftp://" ; then + BGSERVER=$(echo "$BGURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) + BGPATH=$(echo "$BGURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) + if [ -n "\$BGSERVER" ] && [ -n "\$BGPATH" ] ; then + while ! atftp \$BGSERVER -g -r \$BGPATH -l ${BGDESTINATION}.tmp ; do + echo -en "\n\$(date +'%F | %T | ')still waiting for background SVG download (tftp) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + else + while ! wget -q -O ${BGDESTINATION}.tmp $BGURL ; do + echo -en "\n\$(date +'%F | %T | ')still waiting for background SVG download (wget) ..." | tee -a /dev/tty8 + sleep 5 + done + fi + + echo -en "\n\$(date +'%F | %T | ')'\$0': background SVG download complete." | tee -a /dev/tty8 + if ! [ -s ${BGDESTINATION}.tmp ] ; then + mv ${BGDESTINATION}.tmp $BGDESTINATION + fi +) & +GETBG + chmod 755 /etc/network/if-up.d/0420-getbg + fi +} + +X2GoGetBranding diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 87fbae9..01e20d1 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -102,13 +102,38 @@ LDAP2=\$(cat /proc/cmdline | \ sed 's/^ldap2=/ldap2#/' | \ awk -F'#' ' /^ldap2#/ { print \$2 }') + +# Check for background and branding SVGs +BRANDING='' +if grep -q ' branding=' /proc/cmdline; then + while ! [ -s /etc/x2go/branding.svg ]; do + OLDCON=\$(fgconsole) + chvt 1 + echo "'$0' is waiting for a valid '/etc/x2go/branding.svg' file." + sleep 2 + done + [ -n "$OLDCON" ] && chvt $OLDCON + \$BRANDING='--branding=/etc/x2go/branding.svg' +fi +BACKGROUND='' +if grep -q ' bg=' /proc/cmdline; then + while ! [ -s /etc/x2go/bg.svg ]; do + OLDCON=\$(fgconsole) + chvt 1 + echo "'$0' is waiting for a valid '/etc/x2go/bg.svg' file." + sleep 2 + done + [ -n "$OLDCON" ] && chvt $OLDCON + \$BACKGROUND='--background=/etc/x2go/bg.svg' +fi + # Spawn X2GoClient if [ -n "\$BROKERURL" ]; then SESSIONFROM="--broker-url=\$BROKERURL" else SESSIONFROM="--session-conf=/etc/x2go/x2gothinclient_sessions" while ! [ -s /etc/x2go/x2gothinclient_sessions ]; do - OLDCON=$(fgconsole) + OLDCON=\$(fgconsole) chvt 1 echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." sleep 2 @@ -146,7 +171,7 @@ if [ -n "\$BLANKINGTIME" ]; then fi fi -x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM +x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING XSESSION chown user:user /home/user/.xsession -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 72f4a63f3e731583574b67d1ed161b11cefd5a45 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 18:27:23 2017 +0200 fixed missing escapes --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 01e20d1..584cf11 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -112,7 +112,7 @@ if grep -q ' branding=' /proc/cmdline; then echo "'$0' is waiting for a valid '/etc/x2go/branding.svg' file." sleep 2 done - [ -n "$OLDCON" ] && chvt $OLDCON + [ -n "\$OLDCON" ] && chvt \$OLDCON \$BRANDING='--branding=/etc/x2go/branding.svg' fi BACKGROUND='' @@ -123,7 +123,7 @@ if grep -q ' bg=' /proc/cmdline; then echo "'$0' is waiting for a valid '/etc/x2go/bg.svg' file." sleep 2 done - [ -n "$OLDCON" ] && chvt $OLDCON + [ -n "\$OLDCON" ] && chvt \$OLDCON \$BACKGROUND='--background=/etc/x2go/bg.svg' fi @@ -138,7 +138,7 @@ else echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." sleep 2 done - [ -n "$OLDCON" ] && chvt $OLDCON + [ -n "\$OLDCON" ] && chvt \$OLDCON fi if [ -n "\$LDAP" ] ; then if [ -n "\$LDAP1" ] ; 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit fc63b024f8ef18f5d1ca9c21e699364cc510284e Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 18:31:22 2017 +0200 syntax fixes --- config/includes.chroot/lib/live/config/2720-x2go-getbg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg index f15cad2..ccbf90a 100755 --- a/config/includes.chroot/lib/live/config/2720-x2go-getbg +++ b/config/includes.chroot/lib/live/config/2720-x2go-getbg @@ -12,7 +12,7 @@ X2GoGetBG () awk -F'=' ' /^bg=/ { print $2 }') BGDESTINATION=/etc/x2go/bg.svg - if [ -n "$BGURL"] ; then + if [ -n "$BGURL" ] ; then cat >/etc/network/if-up.d/0420-getbg <<GETBG #!/bin/bash export TERM=linux; @@ -58,4 +58,4 @@ GETBG fi } -X2GoGetBranding +X2GoGetBG -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 208e8cd391d7773bff8a53b02e1f73d8171f3801 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 18:35:18 2017 +0200 inverted if condition, no need for a "!" here ... --- config/includes.chroot/lib/live/config/2710-x2go-getbranding | 2 +- config/includes.chroot/lib/live/config/2720-x2go-getbg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding index 39dfc5a..f652c2f 100755 --- a/config/includes.chroot/lib/live/config/2710-x2go-getbranding +++ b/config/includes.chroot/lib/live/config/2710-x2go-getbranding @@ -49,7 +49,7 @@ fi fi echo -en "\n\$(date +'%F | %T | ')'\$0': branding SVG download complete." | tee -a /dev/tty8 - if ! [ -s ${BRANDINGDESTINATION}.tmp ] ; then + if [ -s ${BRANDINGDESTINATION}.tmp ] ; then mv ${BRANDINGDESTINATION}.tmp $BRANDINGDESTINATION fi ) & diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg index ccbf90a..a3855be 100755 --- a/config/includes.chroot/lib/live/config/2720-x2go-getbg +++ b/config/includes.chroot/lib/live/config/2720-x2go-getbg @@ -49,7 +49,7 @@ fi fi echo -en "\n\$(date +'%F | %T | ')'\$0': background SVG download complete." | tee -a /dev/tty8 - if ! [ -s ${BGDESTINATION}.tmp ] ; then + if [ -s ${BGDESTINATION}.tmp ] ; then mv ${BGDESTINATION}.tmp $BGDESTINATION 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 53586c8083f7c77ff305d8fcc9b8f4c8e9f902db Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 18:33:52 2017 +0200 syntax fix --- config/includes.chroot/lib/live/config/2710-x2go-getbranding | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding index 992371e..39dfc5a 100755 --- a/config/includes.chroot/lib/live/config/2710-x2go-getbranding +++ b/config/includes.chroot/lib/live/config/2710-x2go-getbranding @@ -12,7 +12,7 @@ X2GoGetBranding () awk -F'=' ' /^branding=/ { print $2 }') BRANDINGDESTINATION=/etc/x2go/branding.svg - if [ -n "$BRANDINGURL"] ; then + if [ -n "$BRANDINGURL" ] ; then cat >/etc/network/if-up.d/0410-getbranding <<GETBRAND #!/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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d7b55262a97d57a6c7b1b239b2db9ba41e6ec093 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 18:28:42 2017 +0200 fixed more missing escapes --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 584cf11..c951e06 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -109,7 +109,7 @@ if grep -q ' branding=' /proc/cmdline; then while ! [ -s /etc/x2go/branding.svg ]; do OLDCON=\$(fgconsole) chvt 1 - echo "'$0' is waiting for a valid '/etc/x2go/branding.svg' file." + echo "'\$0' is waiting for a valid '/etc/x2go/branding.svg' file." sleep 2 done [ -n "\$OLDCON" ] && chvt \$OLDCON @@ -120,7 +120,7 @@ if grep -q ' bg=' /proc/cmdline; then while ! [ -s /etc/x2go/bg.svg ]; do OLDCON=\$(fgconsole) chvt 1 - echo "'$0' is waiting for a valid '/etc/x2go/bg.svg' file." + echo "'\$0' is waiting for a valid '/etc/x2go/bg.svg' file." sleep 2 done [ -n "\$OLDCON" ] && chvt \$OLDCON @@ -135,7 +135,7 @@ else while ! [ -s /etc/x2go/x2gothinclient_sessions ]; do OLDCON=\$(fgconsole) chvt 1 - echo "'$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." + echo "'\$0' is waiting for a valid '/etc/x2go/x2gothinclient_sessions' file." sleep 2 done [ -n "\$OLDCON" ] && chvt \$OLDCON -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 6732bcb5ab8e9ea7f288dfc519ea02322d4187b3 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Oct 18 12:22:45 2017 +0200 make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 526eeab..c8479e4 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -16,6 +16,8 @@ sed -i -e '/<keyboard>/,/<\/keyboard>/{//!d}' /etc/xdg/openbox/rc.xml 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 +#make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient +sed -i -e '/ToggleMaximize/d' /etc/xdg/openbox/rc.xml cat >/home/user/.xsession <<XSESSION # inspired by -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1489ecc52f49aa196562af83528dbc489578a80d Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Sat Sep 16 18:39:21 2017 +0200 syntax fix --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index c951e06..b0d896e 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -113,7 +113,7 @@ if grep -q ' branding=' /proc/cmdline; then sleep 2 done [ -n "\$OLDCON" ] && chvt \$OLDCON - \$BRANDING='--branding=/etc/x2go/branding.svg' + BRANDING='--branding=/etc/x2go/branding.svg' fi BACKGROUND='' if grep -q ' bg=' /proc/cmdline; then @@ -124,7 +124,7 @@ if grep -q ' bg=' /proc/cmdline; then sleep 2 done [ -n "\$OLDCON" ] && chvt \$OLDCON - \$BACKGROUND='--background=/etc/x2go/bg.svg' + BACKGROUND='--background=/etc/x2go/bg.svg' fi # Spawn X2GoClient -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 0885946d636cb04c6d26f1c5bc0c7c66f09923be Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Sep 19 15:20:48 2017 +0200 fixed an error that kept Xinerama from working (would always clone screens instead) --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index b0d896e..6f629f7 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -73,10 +73,10 @@ for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' /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 + # 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 done # Spawn openbox -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8a4d855c5cd6ea3600d140ad41dee104bd14deb2 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Oct 24 01:52:11 2017 +0200 added support to preselect session via boot parameter --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index c8479e4..36add67 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -92,6 +92,9 @@ xsetroot -solid "#246ed8" BROKERURL=\$(cat /proc/cmdline | \ tr ' ' '\n' | \ awk -F'=' ' /^broker-url=/ { print \$2 }') +SESSIONSELECT=\$(cat /proc/cmdline | \ + tr ' ' '\n' | \ + awk -F'=' ' /^session=/ { print \$2 }') LDAP=\$(cat /proc/cmdline | \ tr ' ' '\n' | \ sed 's/^ldap=/ldap#/' | \ @@ -131,6 +134,9 @@ if grep -q ' bg=' /proc/cmdline; then fi # Spawn X2GoClient +if [ -n "\$SESSIONSELECT" ]; then + STARTSESSION="--session=\$SESSIONSELECT" +else if [ -n "\$BROKERURL" ]; then SESSIONFROM="--broker-url=\$BROKERURL" else @@ -174,7 +180,7 @@ if [ -n "\$BLANKINGTIME" ]; then fi fi -x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING +x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION chown user:user /home/user/.xsession -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit dd76ab4ff19fdec32270485180461a065c740096 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Tue Oct 3 15:28:21 2017 +0200 fixed regression that would allow right-click context menu again --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 6f629f7..526eeab 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -13,6 +13,7 @@ sed -i -e 's#<number>4</number>#<number>1</number>#' /etc/xdg/openbox/rc.xml # disable OpenBox keyboard bindings # this also disables the context menu (would be accessible in xinerama) and things like Alt-F4 for X2GoClient, Xephyr, etc. sed -i -e '/<keyboard>/,/<\/keyboard>/{//!d}' /etc/xdg/openbox/rc.xml +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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 27045238f4a6ee60eef2c32f7ab0457f9366b00a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Oct 24 01:54:36 2017 +0200 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 bc2d8fc..9d571b0 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 nodm -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 183261a0ec3b474d6934848a8148c8f4bc33206b Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Oct 24 01:52:57 2017 +0200 syntax fix --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 36add67..dea8f09 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -136,7 +136,7 @@ fi # Spawn X2GoClient if [ -n "\$SESSIONSELECT" ]; then STARTSESSION="--session=\$SESSIONSELECT" -else +fi if [ -n "\$BROKERURL" ]; then SESSIONFROM="--broker-url=\$BROKERURL" 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit b64dbb803df9543731bf67e2e647b62d4b1d1dbd Author: Stefan Baur <kontakt@baur-itcs.de> Date: Wed Oct 25 19:50:53 2017 +0200 replaced tr ' ' '\n' with the more elaborate sed -e 's/ \([^ ]*\)=/\n\1=/g' to catch blanks in values --- .../lib/live/config/2250-getsshpubkeysfromserver | 2 +- .../lib/live/config/2300-xserver-xorg-getxorgconf | 2 +- .../includes.chroot/lib/live/config/2400-live-autoupdate | 14 +++++++------- config/includes.chroot/lib/live/config/2600-tcpprint | 2 +- .../includes.chroot/lib/live/config/2700-x2go-getsessions | 2 +- .../includes.chroot/lib/live/config/2710-x2go-getbranding | 2 +- config/includes.chroot/lib/live/config/2720-x2go-getbg | 2 +- .../lib/live/config/2900-x2go-thinclientconfig | 14 +++++++------- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 2e278cc..76152fa 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -9,7 +9,7 @@ GetSSHPubKeysFromServer () PUBKEYURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^pubkey=/ { print $2 }') if [ -n "$PUBKEYURL" ] ; then 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 a5e0a4b..9824e8d 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -7,7 +7,7 @@ XServerXorgGetXorgConf () echo -n " xserver-xorg-getxorgconf" XORGCONFURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^xorgconfurl=/ { print $2 }') if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then XORGCONFDESTINATION=/etc/X11/xorg.conf.new diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 5a8f8ca..08649a7 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -119,7 +119,7 @@ echo -n " live-autoupdater (backgrounding update task)" 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 }') + NTFSROOT=$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | 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 @@ -128,7 +128,7 @@ echo -n " live-autoupdater (backgrounding update task)" 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)) + NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | sed -e 's/ \([^ ]*\)=/\n\1=/g' | head -1)) fi fi @@ -163,7 +163,7 @@ echo -n " live-autoupdater (backgrounding update task)" # determine our booted environment as well as the other available ones RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^findiso=/ { print $2 }')")) ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) @@ -171,7 +171,7 @@ echo -n " live-autoupdater (backgrounding update task)" # download url pointing to directory with all required files goes here DOWNLOADURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^updateurl=/ { print $2 }') if [ -z "$DOWNLOADURL" ]; then @@ -183,7 +183,7 @@ echo -n " live-autoupdater (backgrounding update task)" 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 }') + FINDFILE=$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '$1 == "findiso" { print $2 }') [ -z "$FINDFILE" ] && exit 0 for PARTITION in $LISTOFPARTITIONS ; do mount -oro $PARTITION $TEMPMOUNT @@ -214,7 +214,7 @@ echo -n " live-autoupdater (backgrounding update task)" # #BWLIMITPERCENT=20 # in percent, numeric-only BWLIMITPERCENT=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^bwlimit=/ { print $2 }') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 @@ -225,7 +225,7 @@ echo -n " live-autoupdater (backgrounding update task)" # sleeping a random amount of time to ease load on the update server # MAXSLEEPTIME=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then MAXSLEEPTIME=900 diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint index 1da6e7b..c25747e 100755 --- a/config/includes.chroot/lib/live/config/2600-tcpprint +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -10,7 +10,7 @@ echo -n " tcpprint" if grep -q "\W*tcpprint\W*" /proc/cmdline ; then TCPPRINTONLYFROM=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }') if [ -n "$TCPPRINTONLYFROM" ] ; then TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM" diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index 6a4901c..4488e60 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -7,7 +7,7 @@ X2GoGetSessions () echo -n " x2go-getsessions" SESSIONSURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ 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 diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding index f652c2f..e100b68 100755 --- a/config/includes.chroot/lib/live/config/2710-x2go-getbranding +++ b/config/includes.chroot/lib/live/config/2710-x2go-getbranding @@ -8,7 +8,7 @@ X2GoGetBranding () BRANDINGURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^branding=/ { print $2 }') BRANDINGDESTINATION=/etc/x2go/branding.svg diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg index a3855be..83b9927 100755 --- a/config/includes.chroot/lib/live/config/2720-x2go-getbg +++ b/config/includes.chroot/lib/live/config/2720-x2go-getbg @@ -8,7 +8,7 @@ X2GoGetBG () BGURL=$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^bg=/ { print $2 }') BGDESTINATION=/etc/x2go/bg.svg diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index dea8f09..821b103 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -28,7 +28,7 @@ cat >/home/user/.xsession <<XSESSION 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 }') +XRANDRCMDTAINTED=\$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '\$1 == "xinerama" { print \$2 }') # sanitize input case \$XRANDRCMDTAINTED in @@ -90,21 +90,21 @@ xsetroot -solid "#246ed8" # Get X2GoConfig BROKERURL=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^broker-url=/ { print \$2 }') SESSIONSELECT=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ awk -F'=' ' /^session=/ { print \$2 }') LDAP=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ sed 's/^ldap=/ldap#/' | \ awk -F'#' ' /^ldap#/ { print \$2 }') LDAP1=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ sed 's/^ldap1=/ldap1#/' | \ awk -F'#' ' /^ldap1#/ { print \$2 }') LDAP2=\$(cat /proc/cmdline | \ - tr ' ' '\n' | \ + sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ sed 's/^ldap2=/ldap2#/' | \ awk -F'#' ' /^ldap2#/ { print \$2 }') @@ -161,7 +161,7 @@ else LDAPPARAMS="" fi -BLANKINGTIME=\$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '\$1 == "blank" { print \$2 }') +BLANKINGTIME=\$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | 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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 75f79687a2fc0aa45aa50803f7a7230e3743502a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Oct 26 00:33:18 2017 +0200 fixed overzealous filter --- 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 7e7309a..4517e58 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -20,7 +20,7 @@ fi ( if grep -q findiso /proc/cmdline ; then - BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F'=' ' \$1 == "findiso" { print \$2 }' | tr -dc 'a-zA-Z0-9. _\-'))) + BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F'=' ' \$1 == "findiso" { print \$2 }')) | tr -dc 'a-zA-Z0-9. _\-') fi if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c9ec6a97caa1971940e0075b3c4c05831d9a0b01 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Wed Oct 25 22:15:06 2017 +0200 added support for blanks in session names (no quotes required in parameter) --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 821b103..e588422 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -135,7 +135,7 @@ fi # Spawn X2GoClient if [ -n "\$SESSIONSELECT" ]; then - STARTSESSION="--session=\$SESSIONSELECT" + STARTSESSION="--session='\$SESSIONSELECT'" fi if [ -n "\$BROKERURL" ]; then SESSIONFROM="--broker-url=\$BROKERURL" @@ -180,7 +180,7 @@ if [ -n "\$BLANKINGTIME" ]; then fi fi -x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION +eval x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION chown user:user /home/user/.xsession -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 4e86e773bca0417d40f55f9067dcf7b728b89495 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Wed Oct 25 22:57:25 2017 +0200 replaced tr ' ' '\n' with the more elaborate sed -e 's/ \([^ ]*\)=/\n\1=/g' to catch blanks in values --- 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 8354c71..50cb56d 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -20,7 +20,7 @@ fi ( 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 | sed -e 's/ \([^ ]*\)=/\n\1=/g' | 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) -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 755b4f91798cafa703a129e818cc381b9f4b0377 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Wed Oct 25 23:43:03 2017 +0200 added filters and quotes for some additional security, added missing escapes --- .../lib/live/config/2100-show-sysconf | 2 +- .../lib/live/config/2250-getsshpubkeysfromserver | 11 ++++++----- .../lib/live/config/2300-xserver-xorg-getxorgconf | 11 ++++++----- .../lib/live/config/2400-live-autoupdate | 20 ++++++++++++-------- config/includes.chroot/lib/live/config/2600-tcpprint | 3 ++- .../lib/live/config/2700-x2go-getsessions | 11 ++++++----- .../lib/live/config/2710-x2go-getbranding | 7 ++++--- .../includes.chroot/lib/live/config/2720-x2go-getbg | 11 ++++++----- .../lib/live/config/2900-x2go-thinclientconfig | 17 +++++++++++------ 9 files changed, 54 insertions(+), 39 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 50cb56d..7e7309a 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -20,7 +20,7 @@ fi ( if grep -q findiso /proc/cmdline ; then - BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F'=' ' \$1 == "findiso" { print \$2 }'))) + BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F'=' ' \$1 == "findiso" { print \$2 }' | tr -dc 'a-zA-Z0-9. _\-'))) fi if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index 76152fa..e6cac51 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -10,7 +10,8 @@ GetSSHPubKeysFromServer () PUBKEYURL=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^pubkey=/ { print $2 }') + awk -F'=' ' /^pubkey=/ { print $2 }' |\ + tr -dc 'a-zA-Z0-9.:/?%_\-') if [ -n "$PUBKEYURL" ] ; then cat >/etc/network/if-up.d/0200-getsshpubkeysfromserver <<GETPUBKEY @@ -40,16 +41,16 @@ fi 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#' ) + 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 ! atftp "\$PUBKEYSERVER" -g -r "\$PUBKEYPATH" -l /root/.ssh/authorized_keys ; do 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 + while ! wget -q -O - "$PUBKEYURL" >/root/.ssh/authorized_keys ; do echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for download (wget) ..." | tee -a /dev/tty8 sleep 5 done 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 9824e8d..c20e59f 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -8,7 +8,8 @@ echo -n " xserver-xorg-getxorgconf" XORGCONFURL=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^xorgconfurl=/ { print $2 }') + awk -F'=' ' /^xorgconfurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then XORGCONFDESTINATION=/etc/X11/xorg.conf.new cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG @@ -31,16 +32,16 @@ fi 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#' ) + 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 ! atftp "\$XORGCONFSERVER" -g -r "\$XORGCONFPATH" -l $XORGCONFDESTINATION ; do 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 + while ! wget -q -O $XORGCONFDESTINATION "$XORGCONFURL" ; do echo -en "\n\$(date +'%F | %T | ')'\$0': still waiting for xorg.conf download (wget) ..." | tee -a /dev/tty8 sleep 5 done diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 08649a7..00b05ad 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -119,7 +119,7 @@ echo -n " live-autoupdater (backgrounding update task)" unset LC_MESSAGES # Define our mountpoint and check if we're capable of auto-updating - NTFSROOT=$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '/^ntfs-uuid/ { print $2 }') + NTFSROOT=$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '/^ntfs-uuid/ { print $2 }' | tr -dc 'a-zA-Z0-9_\-') 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 @@ -150,7 +150,7 @@ 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 }'))" | awk '{ print $1}') + IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }' | tr -dc 'a-zA-Z0-9./ _\-'))" | 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 @@ -164,7 +164,8 @@ echo -n " live-autoupdater (backgrounding update task)" # determine our booted environment as well as the other available ones RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^findiso=/ { print $2 }')")) + awk -F'=' ' /^findiso=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9./ _\-')")) ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH) RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) @@ -172,7 +173,8 @@ echo -n " live-autoupdater (backgrounding update task)" # download url pointing to directory with all required files goes here DOWNLOADURL=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^updateurl=/ { print $2 }') + awk -F'=' ' /^updateurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') if [ -z "$DOWNLOADURL" ]; then echo -n "\n$(date +'%F | %T | ')'$0': No update URL. Exiting." @@ -183,7 +185,7 @@ echo -n " live-autoupdater (backgrounding update task)" 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 | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '$1 == "findiso" { print $2 }') + FINDFILE=$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '$1 == "findiso" { print $2 }' | tr -dc 'a-zA-Z0-9./ _\-') [ -z "$FINDFILE" ] && exit 0 for PARTITION in $LISTOFPARTITIONS ; do mount -oro $PARTITION $TEMPMOUNT @@ -215,7 +217,8 @@ echo -n " live-autoupdater (backgrounding update task)" #BWLIMITPERCENT=20 # in percent, numeric-only BWLIMITPERCENT=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^bwlimit=/ { print $2 }') + awk -F'=' ' /^bwlimit=/ { print $2 }' | \ + tr -dc '0-9') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 echo -n "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." @@ -226,7 +229,8 @@ echo -n " live-autoupdater (backgrounding update task)" # MAXSLEEPTIME=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }') + awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }' | \ + tr -dc '0-9') if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then MAXSLEEPTIME=900 fi @@ -313,7 +317,7 @@ 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 wget.\n" wget -Nr -P /tmp/ -nd \ - --progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img 2>&1 | \ + --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" diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint index c25747e..b9fa523 100755 --- a/config/includes.chroot/lib/live/config/2600-tcpprint +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -11,7 +11,8 @@ if grep -q "\W*tcpprint\W*" /proc/cmdline ; then TCPPRINTONLYFROM=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }') + awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.\-') if [ -n "$TCPPRINTONLYFROM" ] ; then TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM" fi diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index 4488e60..4972b92 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -8,7 +8,8 @@ X2GoGetSessions () SESSIONSURL=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^sessionsurl=/ { print $2 }') + awk -F'=' ' /^sessionsurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') 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 @@ -34,16 +35,16 @@ fi 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#' ) + 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 ! atftp "\$SESSIONSSERVER" -g -r "\$SESSIONSPATH" -l $SESSIONSDESTINATION ; do 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 + while ! wget -q -O $SESSIONSDESTINATION "$SESSIONSURL" ; do echo -en "\n\$(date +'%F | %T | ')still waiting for session config data (wget) ..." | tee -a /dev/tty8 sleep 5 done diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding index e100b68..e9297e1 100755 --- a/config/includes.chroot/lib/live/config/2710-x2go-getbranding +++ b/config/includes.chroot/lib/live/config/2710-x2go-getbranding @@ -9,7 +9,8 @@ X2GoGetBranding () BRANDINGURL=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^branding=/ { print $2 }') + awk -F'=' ' /^branding=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') BRANDINGDESTINATION=/etc/x2go/branding.svg if [ -n "$BRANDINGURL" ] ; then @@ -36,13 +37,13 @@ fi BRANDINGSERVER=$(echo "$BRANDINGURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) BRANDINGPATH=$(echo "$BRANDINGURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) if [ -n "\$BRANDINGSERVER" ] && [ -n "\$BRANDINGPATH" ] ; then - while ! atftp \$BRANDINGSERVER -g -r \$BRANDINGPATH -l ${BRANDINGDESTINATION}.tmp ; do + while ! atftp "\$BRANDINGSERVER" -g -r "\$BRANDINGPATH" -l ${BRANDINGDESTINATION}.tmp ; do echo -en "\n\$(date +'%F | %T | ')still waiting for branding SVG download (tftp) ..." | tee -a /dev/tty8 sleep 5 done fi else - while ! wget -q -O ${BRANDINGDESTINATION}.tmp $BRANDINGURL ; do + while ! wget -q -O ${BRANDINGDESTINATION}.tmp "$BRANDINGURL" ; do echo -en "\n\$(date +'%F | %T | ')still waiting for branding SVG download (wget) ..." | tee -a /dev/tty8 sleep 5 done diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg index 83b9927..caae25e 100755 --- a/config/includes.chroot/lib/live/config/2720-x2go-getbg +++ b/config/includes.chroot/lib/live/config/2720-x2go-getbg @@ -9,7 +9,8 @@ X2GoGetBG () BGURL=$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^bg=/ { print $2 }') + awk -F'=' ' /^bg=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') BGDESTINATION=/etc/x2go/bg.svg if [ -n "$BGURL" ] ; then @@ -33,16 +34,16 @@ fi echo -en "\n\$(date +'%F | %T | ')'\$0': Attempting background SVG download ..." | tee -a /dev/tty8 if echo "$BGURL" | grep -q "^tftp://" ; then - BGSERVER=$(echo "$BGURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' ) - BGPATH=$(echo "$BGURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' ) + BGSERVER=$(echo "$BGURL" | sed 's#^tftp://\([^/;]*\)/.*$#\1#' ) + BGPATH=$(echo "$BGURL" | sed 's#^tftp://[^/;]*/\([^;]*\)$#\1#' ) if [ -n "\$BGSERVER" ] && [ -n "\$BGPATH" ] ; then - while ! atftp \$BGSERVER -g -r \$BGPATH -l ${BGDESTINATION}.tmp ; do + while ! atftp "\$BGSERVER" -g -r "\$BGPATH" -l ${BGDESTINATION}.tmp ; do echo -en "\n\$(date +'%F | %T | ')still waiting for background SVG download (tftp) ..." | tee -a /dev/tty8 sleep 5 done fi else - while ! wget -q -O ${BGDESTINATION}.tmp $BGURL ; do + while ! wget -q -O ${BGDESTINATION}.tmp "$BGURL" ; do echo -en "\n\$(date +'%F | %T | ')still waiting for background SVG download (wget) ..." | tee -a /dev/tty8 sleep 5 done diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index e588422..72dc7b7 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -91,22 +91,27 @@ xsetroot -solid "#246ed8" # Get X2GoConfig BROKERURL=\$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^broker-url=/ { print \$2 }') + awk -F'=' ' /^broker-url=/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') SESSIONSELECT=\$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^session=/ { print \$2 }') + awk -F'=' ' /^session=/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:/ _\-') LDAP=\$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ sed 's/^ldap=/ldap#/' | \ - awk -F'#' ' /^ldap#/ { print \$2 }') + awk -F'#' ' /^ldap#/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-') LDAP1=\$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ sed 's/^ldap1=/ldap1#/' | \ - awk -F'#' ' /^ldap1#/ { print \$2 }') + awk -F'#' ' /^ldap1#/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-') LDAP2=\$(cat /proc/cmdline | \ sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ sed 's/^ldap2=/ldap2#/' | \ - awk -F'#' ' /^ldap2#/ { print \$2 }') + awk -F'#' ' /^ldap2#/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-') # Check for background and branding SVGs @@ -161,7 +166,7 @@ else LDAPPARAMS="" fi -BLANKINGTIME=\$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '\$1 == "blank" { print \$2 }') +BLANKINGTIME=\$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '\$1 == "blank" { print \$2 }' | tr -dc '0-9:') 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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit fe5a07e1a29800053a1611763b1fefce8691c4f5 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Oct 30 10:54:15 2017 +0100 added trickle package, to limit bandwidth usage; added bandwidth throttling code: single throttle value limits upstream; if multiple values are specified, first is upstream, second is downstream --- .../lib/live/config/2900-x2go-thinclientconfig | 26 +++++++++++++++++++++- config/package-lists/utils.list.chroot | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index e5dbdbe..17df60a 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -180,7 +180,31 @@ if [ -n "\$BLANKINGTIME" ]; then fi fi -eval x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION +THROTTLINGCOMMAND="" +THROTTLEVALUES=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '\$1 == "throttle" { print \$2 }' | tr -dc '0-9.:') +if [ -n "\$THROTTLEVALUES" ]; then + THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.]*\$/ && \$2 ~/^[0-9\.]*\$/ && \$3 ~/^[0-9\.]*\$/ && \$4 ~/^[0-9\.]*\$/ && \$4 ~/^[0-9\.]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) + if [ -n "\${THROTTLEARR[4]}" ]; then + THROTTLELATENCY="-L \${THROTTLEARR[4]}" + fi + if [ -n "\${THROTTLEARR[3]}" ]; then + THROTTLELENGTH="-l \${THROTTLEARR[3]}" + fi + if [ -n "\${THROTTLEARR[2]}" ]; then + THROTTLETIME="-t \${THROTTLEARR[2]}" + fi + if [ -n "\${THROTTLEARR[1]}" ]; then + THROTTLEDOWN="-d \${THROTTLEARR[1]}" + fi + if [ -n "\${THROTTLEARR[0]}" ]; then + THROTTLEUP="-u \${THROTTLEARR[0]}" + THROTTLINGCOMMAND="trickle -s \$THROTTLEDOWN \$THROTTLEUP \$THROTTLETIME \$THROTTLELENGTH \$THROTTLELATENCY" + fi +# only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly +fi + + +eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION chown user:user /home/user/.xsession diff --git a/config/package-lists/utils.list.chroot b/config/package-lists/utils.list.chroot index 930954e..be4701c 100644 --- a/config/package-lists/utils.list.chroot +++ b/config/package-lists/utils.list.chroot @@ -11,6 +11,7 @@ openssl psmisc rsync screen +trickle util-linux vim wget -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 54a435487bf70842c90f1d90ef57d86c95e2a301 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Oct 30 10:51:36 2017 +0100 fixed useless use of cat made sure double/single quotes work for parameters with spaces --- .../lib/live/config/2100-show-sysconf | 2 +- .../lib/live/config/2250-getsshpubkeysfromserver | 3 +- .../lib/live/config/2300-xserver-xorg-getxorgconf | 7 ++-- .../lib/live/config/2400-live-autoupdate | 26 ++++++------- .../includes.chroot/lib/live/config/2600-tcpprint | 7 ++-- .../lib/live/config/2700-x2go-getsessions | 7 ++-- .../lib/live/config/2710-x2go-getbranding | 7 ++-- .../lib/live/config/2720-x2go-getbg | 7 ++-- .../lib/live/config/2900-x2go-thinclientconfig | 45 ++++++++++------------ 9 files changed, 48 insertions(+), 63 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2100-show-sysconf b/config/includes.chroot/lib/live/config/2100-show-sysconf index 35b86c5..f703a6c 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -20,7 +20,7 @@ fi ( if grep -q findiso /proc/cmdline ; then - BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F'=' ' \$1 == "findiso" { print \$2 }')) | tr -dc 'a-zA-Z0-9. _\-') + BOOTEDENV=\$(basename \$(dirname \$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F'=' ' \$1 == "findiso" { print \$2 }')) | tr -dc 'a-zA-Z0-9. _\-') fi for TIMESTAMPFILE in /lib/live/mount/rootfs/*/lib; do TIMESTAMP=\$(stat -c %Y \$TIMESTAMPFILE) diff --git a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver index e6cac51..473fe01 100755 --- a/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver +++ b/config/includes.chroot/lib/live/config/2250-getsshpubkeysfromserver @@ -8,8 +8,7 @@ GetSSHPubKeysFromServer () echo -n " getsshpubkeysfromserver" - PUBKEYURL=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ + PUBKEYURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ awk -F'=' ' /^pubkey=/ { print $2 }' |\ tr -dc 'a-zA-Z0-9.:/?%_\-') 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 c20e59f..9390e9e 100755 --- a/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf +++ b/config/includes.chroot/lib/live/config/2300-xserver-xorg-getxorgconf @@ -6,10 +6,9 @@ XServerXorgGetXorgConf () # echo -n " xserver-xorg-getxorgconf" - XORGCONFURL=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^xorgconfurl=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') + XORGCONFURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^xorgconfurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then XORGCONFDESTINATION=/etc/X11/xorg.conf.new cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index 7e94258..919cb44 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -119,7 +119,7 @@ echo -n " live-autoupdater (backgrounding update task)" unset LC_MESSAGES # Define our mountpoint and check if we're capable of auto-updating - NTFSROOT=$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '/^ntfs-uuid/ { print $2 }' | tr -dc 'a-zA-Z0-9_\-') + NTFSROOT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '/^ntfs-uuid/ { print $2 }' | tr -dc 'a-zA-Z0-9_\-') 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 @@ -128,7 +128,7 @@ echo -n " live-autoupdater (backgrounding update task)" 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 | sed -e 's/ \([^ ]*\)=/\n\1=/g' | head -1)) + NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)) fi fi @@ -162,8 +162,7 @@ echo -n " live-autoupdater (backgrounding update task)" fi # determine our booted environment as well as the other available ones - RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ + RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ awk -F'=' ' /^findiso=/ { print $2 }' | \ tr -dc 'a-zA-Z0-9./ _\-')")) @@ -171,8 +170,7 @@ echo -n " live-autoupdater (backgrounding update task)" RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH) # download url pointing to directory with all required files goes here - DOWNLOADURL=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ + DOWNLOADURL=$( sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ awk -F'=' ' /^updateurl=/ { print $2 }' | \ tr -dc 'a-zA-Z0-9.:/?%_\-') @@ -185,7 +183,7 @@ echo -n " live-autoupdater (backgrounding update task)" 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 | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '$1 == "findiso" { print $2 }' | tr -dc 'a-zA-Z0-9./ _\-') + FINDFILE=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '$1 == "findiso" { print $2 }' | tr -dc 'a-zA-Z0-9./ _\-') [ -z "$FINDFILE" ] && exit 0 for PARTITION in $LISTOFPARTITIONS ; do mount -oro $PARTITION $TEMPMOUNT @@ -215,10 +213,9 @@ echo -n " live-autoupdater (backgrounding update task)" # Bandwidth limit goes here # #BWLIMITPERCENT=20 # in percent, numeric-only - BWLIMITPERCENT=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^bwlimit=/ { print $2 }' | \ - tr -dc '0-9') + BWLIMITPERCENT=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^bwlimit=/ { print $2 }' | \ + tr -dc '0-9') if [ -z "$BWLIMITPERCENT" ]; then BWLIMITPERCENT=20 echo -n "\n$(date +'%F | %T | ')'$0': Bandwidth limit not set. Defaulting to 20%." @@ -227,10 +224,9 @@ echo -n " live-autoupdater (backgrounding update task)" # sleeping a random amount of time to ease load on the update server # - MAXSLEEPTIME=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }' | \ - tr -dc '0-9') + MAXSLEEPTIME=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }' | \ + tr -dc '0-9') if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then MAXSLEEPTIME=900 fi diff --git a/config/includes.chroot/lib/live/config/2600-tcpprint b/config/includes.chroot/lib/live/config/2600-tcpprint index b9fa523..600008a 100755 --- a/config/includes.chroot/lib/live/config/2600-tcpprint +++ b/config/includes.chroot/lib/live/config/2600-tcpprint @@ -9,10 +9,9 @@ echo -n " tcpprint" if grep -q "\W*tcpprint\W*" /proc/cmdline ; then - TCPPRINTONLYFROM=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.\-') + TCPPRINTONLYFROM=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.\-') if [ -n "$TCPPRINTONLYFROM" ] ; then TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM" fi diff --git a/config/includes.chroot/lib/live/config/2700-x2go-getsessions b/config/includes.chroot/lib/live/config/2700-x2go-getsessions index 4972b92..9af7813 100755 --- a/config/includes.chroot/lib/live/config/2700-x2go-getsessions +++ b/config/includes.chroot/lib/live/config/2700-x2go-getsessions @@ -6,10 +6,9 @@ X2GoGetSessions () # echo -n " x2go-getsessions" - SESSIONSURL=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^sessionsurl=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') + SESSIONSURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^sessionsurl=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') 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 diff --git a/config/includes.chroot/lib/live/config/2710-x2go-getbranding b/config/includes.chroot/lib/live/config/2710-x2go-getbranding index e9297e1..71bdfaa 100755 --- a/config/includes.chroot/lib/live/config/2710-x2go-getbranding +++ b/config/includes.chroot/lib/live/config/2710-x2go-getbranding @@ -7,10 +7,9 @@ X2GoGetBranding () echo -n " x2go-getbranding" - BRANDINGURL=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^branding=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') + BRANDINGURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^branding=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') BRANDINGDESTINATION=/etc/x2go/branding.svg if [ -n "$BRANDINGURL" ] ; then diff --git a/config/includes.chroot/lib/live/config/2720-x2go-getbg b/config/includes.chroot/lib/live/config/2720-x2go-getbg index caae25e..b211f85 100755 --- a/config/includes.chroot/lib/live/config/2720-x2go-getbg +++ b/config/includes.chroot/lib/live/config/2720-x2go-getbg @@ -7,10 +7,9 @@ X2GoGetBG () echo -n " x2go-getbg" - BGURL=$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^bg=/ { print $2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') + BGURL=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^bg=/ { print $2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') BGDESTINATION=/etc/x2go/bg.svg if [ -n "$BGURL" ] ; then diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 72dc7b7..e5dbdbe 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -28,7 +28,7 @@ cat >/home/user/.xsession <<XSESSION 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 | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '\$1 == "xinerama" { print \$2 }') +XRANDRCMDTAINTED=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '\$1 == "xinerama" { print \$2 }') # sanitize input case \$XRANDRCMDTAINTED in @@ -89,29 +89,24 @@ openbox & xsetroot -solid "#246ed8" # Get X2GoConfig -BROKERURL=\$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^broker-url=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') -SESSIONSELECT=\$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - awk -F'=' ' /^session=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:/ _\-') -LDAP=\$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - sed 's/^ldap=/ldap#/' | \ - awk -F'#' ' /^ldap#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-') -LDAP1=\$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - sed 's/^ldap1=/ldap1#/' | \ - awk -F'#' ' /^ldap1#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-') -LDAP2=\$(cat /proc/cmdline | \ - sed -e 's/ \([^ ]*\)=/\n\1=/g' | \ - sed 's/^ldap2=/ldap2#/' | \ - awk -F'#' ' /^ldap2#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-') +BROKERURL=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^broker-url=/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:/?%_\-') +SESSIONSELECT=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + awk -F'=' ' /^session=/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:/ _\-') +LDAP=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + sed 's/^ldap=/ldap#/' | \ + awk -F'#' ' /^ldap#/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-') +LDAP1=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + sed 's/^ldap1=/ldap1#/' | \ + awk -F'#' ' /^ldap1#/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-') +LDAP2=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ + sed 's/^ldap2=/ldap2#/' | \ + awk -F'#' ' /^ldap2#/ { print \$2 }' | \ + tr -dc 'a-zA-Z0-9.:_\-') # Check for background and branding SVGs @@ -166,7 +161,7 @@ else LDAPPARAMS="" fi -BLANKINGTIME=\$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F '=' '\$1 == "blank" { print \$2 }' | tr -dc '0-9:') +BLANKINGTIME=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '\$1 == "blank" { print \$2 }' | tr -dc '0-9:') 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 -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 0944a640a3d897f884385c84c28b99737c33a72a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Oct 26 02:25:15 2017 +0200 fix to display timestamp/version information regardless of squashfs file name --- config/includes.chroot/lib/live/config/2100-show-sysconf | 6 +++--- 1 file changed, 3 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 4517e58..35b86c5 100755 --- a/config/includes.chroot/lib/live/config/2100-show-sysconf +++ b/config/includes.chroot/lib/live/config/2100-show-sysconf @@ -22,10 +22,10 @@ fi if grep -q findiso /proc/cmdline ; then BOOTEDENV=\$(basename \$(dirname \$(cat /proc/cmdline | sed -e 's/ \([^ ]*\)=/\n\1=/g' | awk -F'=' ' \$1 == "findiso" { print \$2 }')) | tr -dc 'a-zA-Z0-9. _\-') fi - if [ -d /lib/live/mount/rootfs/filesystem.squashfs/lib ] ; then - TIMESTAMP=\$(stat -c %Y /lib/live/mount/rootfs/filesystem.squashfs/lib) + for TIMESTAMPFILE in /lib/live/mount/rootfs/*/lib; do + TIMESTAMP=\$(stat -c %Y \$TIMESTAMPFILE) HUMANTIMESTAMP=\$(date --date="@\$TIMESTAMP") - fi + done # clear old entries sed -i '/^- /d' /etc/issue -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 84d1c063b7deb75918fbbdfdfea477b9620058cc Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Oct 26 01:03:19 2017 +0200 quoting fixed --- 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 ee4f324..7e94258 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -43,7 +43,7 @@ show_versions () echo "$(cat $TIMESTAMPFILE);$(basename $(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 + 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 318287287d3d73ceafdb0a36f8fe3f09bf778e97 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Oct 26 00:50:04 2017 +0200 syntaxfix --- 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 00b05ad..ee4f324 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -41,7 +41,7 @@ show_versions () echo "--- BEGIN TIMESTAMPS ---" >/var/run/x2go-tce-timestamps for TIMESTAMPFILE in $LISTOFTIMESTAMPFILES; do echo "$(cat $TIMESTAMPFILE);$(basename $(dirname $TIMESTAMPFILE));" >>/var/run/x2go-tce-timestamps - echo -n "\n$(date +'%F | %T | ')'$0': $(basename $(cat $TIMESTAMPFILE) - $(dirname $TIMESTAMPFILE)) - $(date --date=@$(cat $TIMESTAMPFILE))" + 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 echo "---- END TIMESTAMPS ----" >>/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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c94fd94de139b59b7b4b36558ad06c4ce36c3fd4 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Oct 30 10:57:37 2017 +0100 changed throttling code so it allows for "unlimited" values by specifying "u" instead of a number --- .../lib/live/config/2900-x2go-thinclientconfig | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 17df60a..4f57544 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -181,29 +181,30 @@ if [ -n "\$BLANKINGTIME" ]; then fi THROTTLINGCOMMAND="" -THROTTLEVALUES=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '\$1 == "throttle" { print \$2 }' | tr -dc '0-9.:') +THROTTLEVALUES=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '\$1 == "throttle" { print \$2 }' | tr -dc '0-9.:u') if [ -n "\$THROTTLEVALUES" ]; then - THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.]*\$/ && \$2 ~/^[0-9\.]*\$/ && \$3 ~/^[0-9\.]*\$/ && \$4 ~/^[0-9\.]*\$/ && \$4 ~/^[0-9\.]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) - if [ -n "\${THROTTLEARR[4]}" ]; then + THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.u]*\$/ && \$2 ~/^[0-9\.u]*\$/ && \$3 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) + if [ -n "\${THROTTLEARR[4]}" ] && [ "\${THROTTLEARR[4]}" != "u" ] ; then THROTTLELATENCY="-L \${THROTTLEARR[4]}" fi - if [ -n "\${THROTTLEARR[3]}" ]; then + if [ -n "\${THROTTLEARR[3]}" ] && [ "\${THROTTLEARR[3]}" != "u" ]; then THROTTLELENGTH="-l \${THROTTLEARR[3]}" fi - if [ -n "\${THROTTLEARR[2]}" ]; then + if [ -n "\${THROTTLEARR[2]}" ] && [ "\${THROTTLEARR[2]}" != "u" ]; then THROTTLETIME="-t \${THROTTLEARR[2]}" fi - if [ -n "\${THROTTLEARR[1]}" ]; then + if [ -n "\${THROTTLEARR[1]}" ] && [ "\${THROTTLEARR[1]}" != "u" ]; then THROTTLEDOWN="-d \${THROTTLEARR[1]}" fi - if [ -n "\${THROTTLEARR[0]}" ]; then + if [ -n "\${THROTTLEARR[0]}" ] && [ "\${THROTTLEARR[0]}" != "u" ]; then THROTTLEUP="-u \${THROTTLEARR[0]}" + fi + # only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly + if [ -n "\$THROTTLEUP" ] || [ -n "\$THROTTLEDOWN" ] || [ -n "\$THROTTLETIME" ] || [ -n "\$THROTTLELENGTH" ] || [ -n "\$THROTTLELATENCY" ]; then THROTTLINGCOMMAND="trickle -s \$THROTTLEDOWN \$THROTTLEUP \$THROTTLETIME \$THROTTLELENGTH \$THROTTLELATENCY" fi -# only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly fi - eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 39070ec838dac3c7f49945b849b836f246082acb Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Oct 30 14:08:54 2017 +0100 added comments explaining default values --- .../lib/live/config/2900-x2go-thinclientconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 65f1717..3270046 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -192,25 +192,25 @@ if [ -n "\$THROTTLEVALUES" ]; then THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.u]*\$/ && \$2 ~/^[0-9\.u]*\$/ && \$3 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) if [ -n "\${THROTTLEARR[0]}" ] && [ "\${THROTTLEARR[0]}" != "u" ]; then - THROTTLEDOWN="-d \${THROTTLEARR[0]}" + THROTTLEDOWN="-d \${THROTTLEARR[0]}" # default 10, never used elif [ "\${THROTTLEARR[0]}" = "u" ]; then THROTTLEDOWN="-d \$MAXSPEEDKBYTE" fi if [ -n "\${THROTTLEARR[1]}" ] && [ "\${THROTTLEARR[1]}" != "u" ]; then - THROTTLEUP="-u \${THROTTLEARR[1]}" + THROTTLEUP="-u \${THROTTLEARR[1]}" # default 10, never used elif [ "\${THROTTLEARR[1]}" = "u" ]; then THROTTLEUP="-d \$MAXSPEEDKBYTE" elif [ -z "\${THROTTLEARR[1]}" ] ; then - THROTTLEUP="-d \${THROTTLEARR[0]}" + THROTTLEUP="-d \${THROTTLEARR[0]}" # set up=down if only 1 param fi if [ -n "\${THROTTLEARR[2]}" ] ; then - THROTTLETIME="-t \${THROTTLEARR[2]}" + THROTTLETIME="-t \${THROTTLEARR[2]}" # default 3.0 fi if [ -n "\${THROTTLEARR[3]}" ] ; then - THROTTLELENGTH="-l \${THROTTLEARR[3]}" + THROTTLELENGTH="-l \${THROTTLEARR[3]}" # default 20 fi if [ -n "\${THROTTLEARR[4]}" ] ; then - THROTTLELATENCY="-L \${THROTTLEARR[4]}" + THROTTLELATENCY="-L \${THROTTLEARR[4]}" # default 0 fi # only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly if [ -n "\$THROTTLEUP" ] || [ -n "\$THROTTLEDOWN" ] || [ -n "\$THROTTLETIME" ] || [ -n "\$THROTTLELENGTH" ] || [ -n "\$THROTTLELATENCY" ]; 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8b6ca5d162df34d7c5c4425da4f85f45bc83c2f5 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Oct 30 14:00:48 2017 +0100 rearranged detection sequence of throttling commands, also, rearranged parameter sequence to match trickle defaults: -d -u -t -l -L; Added code to determine maximum line speed for "u" values --- .../lib/live/config/2900-x2go-thinclientconfig | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 4f57544..65f1717 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -183,21 +183,34 @@ fi THROTTLINGCOMMAND="" THROTTLEVALUES=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | awk -F '=' '\$1 == "throttle" { print \$2 }' | tr -dc '0-9.:u') if [ -n "\$THROTTLEVALUES" ]; then + # determine maximum line speed + # look for all interfaces in state "up", then read their speed value from the file named speed + # just ignore the output if there is none, then sort numeric, unique, and read last line=highest, + # then sanitize + MAXSPEEDMBIT=$(grep -l "up" /sys/class/net/*/operstate | xargs -n1 dirname | xargs -n 1 -I XXX cat XXX/speed 2>/dev/null | sort -n -u | tail -1 | tr -dc '0-9.') + MAXSPEEDKBYTE=$((MAXSPEEDMBIT*128)) #Megabit * 1024 / 8 -> KiloByte + THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.u]*\$/ && \$2 ~/^[0-9\.u]*\$/ && \$3 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) - if [ -n "\${THROTTLEARR[4]}" ] && [ "\${THROTTLEARR[4]}" != "u" ] ; then - THROTTLELATENCY="-L \${THROTTLEARR[4]}" + if [ -n "\${THROTTLEARR[0]}" ] && [ "\${THROTTLEARR[0]}" != "u" ]; then + THROTTLEDOWN="-d \${THROTTLEARR[0]}" + elif [ "\${THROTTLEARR[0]}" = "u" ]; then + THROTTLEDOWN="-d \$MAXSPEEDKBYTE" fi - if [ -n "\${THROTTLEARR[3]}" ] && [ "\${THROTTLEARR[3]}" != "u" ]; then - THROTTLELENGTH="-l \${THROTTLEARR[3]}" + if [ -n "\${THROTTLEARR[1]}" ] && [ "\${THROTTLEARR[1]}" != "u" ]; then + THROTTLEUP="-u \${THROTTLEARR[1]}" + elif [ "\${THROTTLEARR[1]}" = "u" ]; then + THROTTLEUP="-d \$MAXSPEEDKBYTE" + elif [ -z "\${THROTTLEARR[1]}" ] ; then + THROTTLEUP="-d \${THROTTLEARR[0]}" fi - if [ -n "\${THROTTLEARR[2]}" ] && [ "\${THROTTLEARR[2]}" != "u" ]; then + if [ -n "\${THROTTLEARR[2]}" ] ; then THROTTLETIME="-t \${THROTTLEARR[2]}" fi - if [ -n "\${THROTTLEARR[1]}" ] && [ "\${THROTTLEARR[1]}" != "u" ]; then - THROTTLEDOWN="-d \${THROTTLEARR[1]}" + if [ -n "\${THROTTLEARR[3]}" ] ; then + THROTTLELENGTH="-l \${THROTTLEARR[3]}" fi - if [ -n "\${THROTTLEARR[0]}" ] && [ "\${THROTTLEARR[0]}" != "u" ]; then - THROTTLEUP="-u \${THROTTLEARR[0]}" + if [ -n "\${THROTTLEARR[4]}" ] ; then + THROTTLELATENCY="-L \${THROTTLEARR[4]}" fi # only set THROTTLINGCOMMAND if at least one value was detected and sanitized properly if [ -n "\$THROTTLEUP" ] || [ -n "\$THROTTLEDOWN" ] || [ -n "\$THROTTLETIME" ] || [ -n "\$THROTTLELENGTH" ] || [ -n "\$THROTTLELATENCY" ]; 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 225b4c9c77ac46b814f8f88b48df169b61b267c3 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sat Nov 4 23:54:15 2017 +0100 added workaround for NX "magic pixel" being active in --thinclient mode --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 5 +++++ config/package-lists/magic-pixel-workaround.chroot | 3 +++ 2 files changed, 8 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index e846424..a841717 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -218,6 +218,11 @@ if [ -n "\$THROTTLEVALUES" ]; then fi fi +# workaround for NX "magic pixel" being active in --thinclient mode +while true ; do + ps -C xdotool >/dev/null || xdotool search . behave %@ blur windowmap ; +done & + eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION diff --git a/config/package-lists/magic-pixel-workaround.chroot b/config/package-lists/magic-pixel-workaround.chroot new file mode 100644 index 0000000..9c0cb9d --- /dev/null +++ b/config/package-lists/magic-pixel-workaround.chroot @@ -0,0 +1,3 @@ +libxdo3 +libxkbcommon0 +xdotool -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d9ae0c9878966137c5cdb7d80c39809266c10363 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 5 16:25:55 2017 +0100 workaround wasn't working, swapped out for now-working code --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index a841717..73ff074 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -219,8 +219,11 @@ if [ -n "\$THROTTLEVALUES" ]; then fi # workaround for NX "magic pixel" being active in --thinclient mode -while true ; do - ps -C xdotool >/dev/null || xdotool search . behave %@ blur windowmap ; +while ! ps -C xdotool >/dev/null ; do + while [ $(xdotool search --name . | wc -l) -lt 3 ] ; do + sleep 1 + done ; + xdotool search . behave %@ blur windowmap done & eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 7515680ecdb4251f4ed9096b4a6cacd9c8c7821a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Oct 30 15:22:32 2017 +0100 fixed missing escapes --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 3270046..e846424 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -187,8 +187,8 @@ if [ -n "\$THROTTLEVALUES" ]; then # look for all interfaces in state "up", then read their speed value from the file named speed # just ignore the output if there is none, then sort numeric, unique, and read last line=highest, # then sanitize - MAXSPEEDMBIT=$(grep -l "up" /sys/class/net/*/operstate | xargs -n1 dirname | xargs -n 1 -I XXX cat XXX/speed 2>/dev/null | sort -n -u | tail -1 | tr -dc '0-9.') - MAXSPEEDKBYTE=$((MAXSPEEDMBIT*128)) #Megabit * 1024 / 8 -> KiloByte + MAXSPEEDMBIT=\$(grep -l "up" /sys/class/net/*/operstate | xargs -n1 dirname | xargs -n 1 -I XXX cat XXX/speed 2>/dev/null | sort -n -u | tail -1 | tr -dc '0-9.') + MAXSPEEDKBYTE=\$((MAXSPEEDMBIT*128)) #Megabit * 1024 / 8 -> KiloByte THROTTLEARR=(\$(echo \$THROTTLEVALUES | awk -F ':' '\$1 ~/^[0-9\.u]*\$/ && \$2 ~/^[0-9\.u]*\$/ && \$3 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ && \$4 ~/^[0-9\.u]*\$/ { print \$1 " " \$2 " " \$3 " " \$4 " " \$5}')) if [ -n "\${THROTTLEARR[0]}" ] && [ "\${THROTTLEARR[0]}" != "u" ]; 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 767520f57e66bf4ce7def9f5f133845796ceaaa7 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 5 12:27:29 2017 +0100 changed file name as it didn't contain ".list" and thus seems to have been ignored --- .../{magic-pixel-workaround.chroot => magic-pixel-workaround.list.chroot} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/package-lists/magic-pixel-workaround.chroot b/config/package-lists/magic-pixel-workaround.list.chroot similarity index 100% rename from config/package-lists/magic-pixel-workaround.chroot rename to config/package-lists/magic-pixel-workaround.list.chroot -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 8d5893635cfe4cccd070e3ccd9d2be89a00d83c3 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 14:06:42 2017 +0100 added script to add and store SSH host keys when proper media is present --- .../lib/live/config/2260-getsshhostkeysfrommedia | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia new file mode 100644 index 0000000..8050125 --- /dev/null +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -0,0 +1,63 @@ +#!/bin/sh + + +GetSSHHostKeysFromMedia () +{ + # Output startup message + # + echo -n " getsshhostkeysfrommedia" + + # nudge automounter, in case device was already plugged in at power-up + udevadm trigger --action=add + + # list devices (and mountpoints, if present) + X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') + + # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) + BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort | awk -F'/' '{print $4}') + + check_for_config (){ + if [ -d $1/config/sshdkeys ] ; then + # any keyfile in the config dir will be copied over to live system + for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do + [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 + done + # no keys present (as detected by flag not being set), but directory is there? Store keys. + if [ -z "$KEYFLAG" ] ; then + mount -oremount,rw $1 && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ + else + # reload sshd config + service ssh reload + fi + return 0 + else + return 1 + fi + } + + for BLOCKDEV in $BLOCKDEVS; do + NEXTDEVICE=$(echo -e "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") + if [ -n "$NEXTDEVICE" ] ; then + MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + + if [ -n "$MNTPT" ] ; then + # echo "$NEXTDEVICE is mounted at: $MNTPT" + check_for_config $MNTPT && exit 0 + else + # echo "$NEXTDEVICE is not mounted" + if grep -q "^0$" /sys/block/*/removable ; then + # echo "Is fixed disk, mounting" + mkdir -p /media/fixeddisks/$NEXTDEVICE + mount /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 + else + # echo "Is removable disk, not mounted by automounter -> don't touch" + : + fi + fi + fi + done +} + +GetSSHHostKeysFromMedia -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ca528853877737bcccd3bc4db893975c7384ad70 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 16:10:27 2017 +0100 make sure file permissions are correct, even when copying from vfat; make sure all keys are generated before storing on media --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 8050125..438957b 100644 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -21,9 +21,15 @@ GetSSHHostKeysFromMedia () # any keyfile in the config dir will be copied over to live system for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 + if echo $(basename $KEYFILE) | grep -q '\.pub$' ; then + chmod 644 /etc/ssh/$(basename $KEYFILE) + else + chmod 600 /etc/ssh/$(basename $KEYFILE) + fi done # no keys present (as detected by flag not being set), but directory is there? Store keys. if [ -z "$KEYFLAG" ] ; then + ssh-keygen -A # make sure we have keyfiles for every key the server expects mount -oremount,rw $1 && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ else # reload sshd config -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 6799f3fd65ae4532c054fcff9614115f92d5509f Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sun Nov 5 19:11:35 2017 +0100 fixed missing escape (when will I ever learn ...) --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 73ff074..5344fe2 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -220,7 +220,7 @@ fi # workaround for NX "magic pixel" being active in --thinclient mode while ! ps -C xdotool >/dev/null ; do - while [ $(xdotool search --name . | wc -l) -lt 3 ] ; do + while [ \$(xdotool search --name . | wc -l) -lt 3 ] ; do sleep 1 done ; xdotool search . behave %@ blur windowmap -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 020c4e20b8eeac5493d0e1a6e15e55a653026b7f Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 14:36:08 2017 +0100 renamed 2510-x2go-getopensshportableclientkey -> 2270-getsshclientkeysfrommedia as the contents have been changed to a more generic form - it is now no longer specific to X2Go --- .../lib/live/config/2270-getsshclientkeysfrommedia | 98 ++++++++++++++++++++++ .../config/2510-x2go-getopensshportableclientkey | 46 ---------- 2 files changed, 98 insertions(+), 46 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia new file mode 100755 index 0000000..b2498fd --- /dev/null +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -0,0 +1,98 @@ +#!/bin/sh + + +GetSSHClientKeysFromMedia () +{ + # Output startup message + # + echo -n " getsshclientkeysfrommedia" + + # This script is for using the iso-hybrid image along with the "second partition" patch + # or other suitable storage media. When used with the iso-hybrid image for X2Go in portable mode, + # 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. + # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. + + # Homedir of user account + # + USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }') + + # nudge automounter, in case device was already plugged in at power-up + # + udevadm trigger --action=add + + # list devices (and mountpoints, if present) + # + X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') + + # support for legacy label value + # + PORTABLEAPPLABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}') + + # block device list, removable first (we want USB media to be able to override keys on fixed disks) + # + BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') + + check_for_config (){ + if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$USERHOME/.ssh/") + + # any keyfile in the config dir will be copied over to live system + # + for KEYFILE in $1/config/ssh/* $1/ssh $1/.ssh ; do + [ -s "$KEYFILE" ] || continue + KEYDESTPATH="$USERHOME/.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 $USERHOME/.ssh $USERHOME/ssh + + return 0 + else + return 1 + fi + } + + for BLOCKDEV in $BLOCKDEVS; do + NEXTDEVICE=$(echo -e "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") + if [ -n "$NEXTDEVICE" ] ; then + MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + + if [ -n "$MNTPT" ] ; then + # echo "$NEXTDEVICE is mounted at: $MNTPT" + check_for_config $MNTPT && exit 0 + else + # echo "$NEXTDEVICE is not mounted" + if grep -q "^0$" /sys/block/*/removable ; then + # echo "Is fixed disk, mounting" + mkdir -p /media/fixeddisks/$NEXTDEVICE + mount /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 + else + # echo "Is removable disk, not mounted by automounter -> don't touch" + : + fi + fi + fi + done +} + + + + + fi +} + +GetSSHClientKeysFromMedia + diff --git a/config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey b/config/includes.chroot/lib/live/config/2510-x2go-getopensshportableclientkey deleted file mode 100755 index 1f7b486..0000000 --- a/config/includes.chroot/lib/live/config/2510-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 - -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit ce0d2b4c82dae834d8968f68558c97e4aa172959 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 17:24:12 2017 +0100 dash's echo does not understand -e, thus removed --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 438957b..78e4dd5 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -42,7 +42,7 @@ GetSSHHostKeysFromMedia () } for BLOCKDEV in $BLOCKDEVS; do - NEXTDEVICE=$(echo -e "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") + NEXTDEVICE=$(echo "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 892892c..de07b01 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -64,7 +64,7 @@ GetSSHClientKeysFromMedia () } for BLOCKDEV in $BLOCKDEVS; do - NEXTDEVICE=$(echo -e "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") + NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") if [ -n "$NEXTDEVICE" ] ; then MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $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/openbox-magic-pixel-workaround in repository live-build-x2go. commit c62e51796ce78852754f5d3e31348829a2096cb2 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 16:16:02 2017 +0100 executable bit was missing --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 1c382d763516905bf14fcb926d1e15417b1dba69 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 16:22:57 2017 +0100 fixed syntax error stemming from copypasta --- .../includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index b2498fd..892892c 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -88,11 +88,5 @@ GetSSHClientKeysFromMedia () done } - - - - fi -} - GetSSHClientKeysFromMedia -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 0d41297c4c6ad79c464f76bcf2d657c61db317bd Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:24:26 2017 +0100 added umount command for self-mounted devices --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 7ce7c8c..aad3b9d 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -92,7 +92,7 @@ GetSSHHostKeysFromMedia () echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE - check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 + check_for_config /media/fixeddisks/$NEXTDEVICE && umount /media/fixeddisks/$NEXTDEVICE && exit 0 else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit baa5147e7f79a675fc7fe91957d9f5abeb239fd4 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:20:53 2017 +0100 removed unneccessary escapes --- .../lib/live/config/2260-getsshhostkeysfrommedia | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 81bdf99..7ce7c8c 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -8,15 +8,15 @@ GetSSHHostKeysFromMedia () echo -n " getsshhostkeysfrommedia" ( while ! [ -c /dev/tty8 ] ; do - echo -n "\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 # nudge automounter, in case device was already plugged in at power-up if udevadm trigger --action=add ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 else - echo -n "\n\$(date +'%F | %T | ')'\$0' Error while nudging udev-automounter." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Error while nudging udev-automounter." | tee -a /dev/tty8 fi # list devices (and mountpoints, if present) @@ -27,7 +27,7 @@ GetSSHHostKeysFromMedia () check_for_config (){ if [ -d $1/config/sshdkeys ] ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Keyfile directory found at '$1/config/sshdkeys'." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/sshdkeys'." | tee -a /dev/tty8 # any keyfile in the config dir will be copied over to live system for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 @@ -39,36 +39,36 @@ GetSSHHostKeysFromMedia () done # no keys present (as detected by flag not being set), but directory is there? Store keys. if [ -z "$KEYFLAG" ] ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' No keyfiles were found in the keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' No keyfiles were found in the keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 ssh-keygen -A # make sure we have keyfiles for every key the server expects - echo -n "\n\$(date +'%F | %T | ')'\$0' Attempting to copy current keyfiles to keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Attempting to copy current keyfiles to keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 if awk '$2=="'$1'" {print $4 }' /proc/mounts | tr ',' '\n' | grep -q '^ro$' ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Attempting to remount '$1' with flags rw and sync." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Attempting to remount '$1' with flags rw and sync." | tee -a /dev/tty8 if mount -oremount,rw,sync $1 ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Successfully remounted '$1'." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Successfully remounted '$1'." | tee -a /dev/tty8 REMOUNT="rws" else - echo -n "\n\$(date +'%F | %T | ')'\$0' Error remounting '$1'." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Error remounting '$1'." | tee -a /dev/tty8 fi fi if ([ -z "$REMOUNT" ] || [ "$REMOUNT" = "rws" ]) && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Copying keyfiles succeeded." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Copying keyfiles succeeded." | tee -a /dev/tty8 else - echo -n "\n\$(date +'%F | %T | ')'\$0' Error copying keyfiles." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Error copying keyfiles." | tee -a /dev/tty8 fi if [ -n "$REMOUNT" ] && mount -oremount,ro $1 ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Remounted '$1' read-only." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Remounted '$1' read-only." | tee -a /dev/tty8 else - echo -n "\n\$(date +'%F | %T | ')'\$0' Error remounting '$1' read-only." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Error remounting '$1' read-only." | tee -a /dev/tty8 fi else # reload sshd config - echo -n "\n\$(date +'%F | %T | ')'\$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 if service ssh reload ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' New keyfiles activated." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8 else - echo -n "\n\$(date +'%F | %T | ')'\$0' Error activating new keyfiles." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8 fi fi return 0 @@ -84,17 +84,17 @@ GetSSHHostKeysFromMedia () NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') if [ -n "$MNTPT" ] ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 check_for_config $MNTPT && exit 0 else - echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 if grep -q "^0$" /sys/block/*/removable ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 else - echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 : 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 4ed72ebfbcc23f8d45bc016294dacab537ac664e Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 19:12:04 2017 +0100 backgrounded entire task, added error checks and log output --- .../lib/live/config/2260-getsshhostkeysfrommedia | 127 +++++++++++++-------- 1 file changed, 82 insertions(+), 45 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 78e4dd5..81bdf99 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -6,64 +6,101 @@ GetSSHHostKeysFromMedia () # Output startup message # echo -n " getsshhostkeysfrommedia" + ( + while ! [ -c /dev/tty8 ] ; do + echo -n "\n\$(date +'%F | %T | ')'\$0' is waiting for tty8 to become available." + sleep 2 + done - # nudge automounter, in case device was already plugged in at power-up - udevadm trigger --action=add + # nudge automounter, in case device was already plugged in at power-up + if udevadm trigger --action=add ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 + else + echo -n "\n\$(date +'%F | %T | ')'\$0' Error while nudging udev-automounter." | tee -a /dev/tty8 + fi - # list devices (and mountpoints, if present) - X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') + # list devices (and mountpoints, if present) + X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') - # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) - BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort | awk -F'/' '{print $4}') + # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks) + BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort | awk -F'/' '{print $4}') - check_for_config (){ - if [ -d $1/config/sshdkeys ] ; then - # any keyfile in the config dir will be copied over to live system - for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do - [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 - if echo $(basename $KEYFILE) | grep -q '\.pub$' ; then - chmod 644 /etc/ssh/$(basename $KEYFILE) + check_for_config (){ + if [ -d $1/config/sshdkeys ] ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Keyfile directory found at '$1/config/sshdkeys'." | tee -a /dev/tty8 + # any keyfile in the config dir will be copied over to live system + for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do + [ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1 + if echo $(basename $KEYFILE) | grep -q '\.pub$' ; then + chmod 644 /etc/ssh/$(basename $KEYFILE) + else + chmod 600 /etc/ssh/$(basename $KEYFILE) + fi + done + # no keys present (as detected by flag not being set), but directory is there? Store keys. + if [ -z "$KEYFLAG" ] ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' No keyfiles were found in the keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 + ssh-keygen -A # make sure we have keyfiles for every key the server expects + echo -n "\n\$(date +'%F | %T | ')'\$0' Attempting to copy current keyfiles to keyfile directory '$1/config/sshdkeys'." | tee -a /dev/tty8 + if awk '$2=="'$1'" {print $4 }' /proc/mounts | tr ',' '\n' | grep -q '^ro$' ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Attempting to remount '$1' with flags rw and sync." | tee -a /dev/tty8 + if mount -oremount,rw,sync $1 ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Successfully remounted '$1'." | tee -a /dev/tty8 + REMOUNT="rws" + else + echo -n "\n\$(date +'%F | %T | ')'\$0' Error remounting '$1'." | tee -a /dev/tty8 + fi + fi + if ([ -z "$REMOUNT" ] || [ "$REMOUNT" = "rws" ]) && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Copying keyfiles succeeded." | tee -a /dev/tty8 + else + echo -n "\n\$(date +'%F | %T | ')'\$0' Error copying keyfiles." | tee -a /dev/tty8 + fi + if [ -n "$REMOUNT" ] && mount -oremount,ro $1 ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Remounted '$1' read-only." | tee -a /dev/tty8 + else + echo -n "\n\$(date +'%F | %T | ')'\$0' Error remounting '$1' read-only." | tee -a /dev/tty8 + fi + else - chmod 600 /etc/ssh/$(basename $KEYFILE) + # reload sshd config + echo -n "\n\$(date +'%F | %T | ')'\$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 + if service ssh reload ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' New keyfiles activated." | tee -a /dev/tty8 + else + echo -n "\n\$(date +'%F | %T | ')'\$0' Error activating new keyfiles." | tee -a /dev/tty8 + fi fi - done - # no keys present (as detected by flag not being set), but directory is there? Store keys. - if [ -z "$KEYFLAG" ] ; then - ssh-keygen -A # make sure we have keyfiles for every key the server expects - mount -oremount,rw $1 && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/ + return 0 else - # reload sshd config - service ssh reload + return 1 fi - return 0 - else - return 1 - fi - } + } - for BLOCKDEV in $BLOCKDEVS; do - NEXTDEVICE=$(echo "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") - if [ -n "$NEXTDEVICE" ] ; then - MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') - NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + for BLOCKDEV in $BLOCKDEVS; do + NEXTDEVICE=$(echo "$X2GOTCELIVELABELS" | grep "$BLOCKDEV") + if [ -n "$NEXTDEVICE" ] ; then + MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') - if [ -n "$MNTPT" ] ; then - # echo "$NEXTDEVICE is mounted at: $MNTPT" - check_for_config $MNTPT && exit 0 - else - # echo "$NEXTDEVICE is not mounted" - if grep -q "^0$" /sys/block/*/removable ; then - # echo "Is fixed disk, mounting" - mkdir -p /media/fixeddisks/$NEXTDEVICE - mount /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE - check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 + if [ -n "$MNTPT" ] ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + check_for_config $MNTPT && exit 0 else - # echo "Is removable disk, not mounted by automounter -> don't touch" - : + echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + if grep -q "^0$" /sys/block/*/removable ; then + echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + mkdir -p /media/fixeddisks/$NEXTDEVICE + mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 + else + echo -n "\n\$(date +'%F | %T | ')'\$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 + : + fi fi fi - fi - done + done + ) & } GetSSHHostKeysFromMedia -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit bcacbefb5e783a7589904e213c8268695ec86778 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:59:15 2017 +0100 changed routine to be more like GetSSHHostKeysFromMedia, also, added check so it waits until GetSSHHostKeysFromMedia is done --- .../lib/live/config/2270-getsshclientkeysfrommedia | 162 ++++++++++++--------- 1 file changed, 92 insertions(+), 70 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index de07b01..e92a176 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -6,86 +6,108 @@ GetSSHClientKeysFromMedia () # Output startup message # echo -n " getsshclientkeysfrommedia" + ( - # This script is for using the iso-hybrid image along with the "second partition" patch - # or other suitable storage media. When used with the iso-hybrid image for X2Go in portable mode, - # 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. - # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. + # This script is for using the iso-hybrid image along with the "second partition" patch + # or other suitable storage media. When used with the iso-hybrid image for X2Go in portable mode, + # 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. + # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. - # Homedir of user account - # - USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }') - - # nudge automounter, in case device was already plugged in at power-up - # - udevadm trigger --action=add - - # list devices (and mountpoints, if present) - # - X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') - - # support for legacy label value - # - PORTABLEAPPLABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}') - - # block device list, removable first (we want USB media to be able to override keys on fixed disks) - # - BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') + while ! [ -c /dev/tty8 ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done - check_for_config (){ - if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then - # create .ssh-Directory in case it doesn't exist - # - mkdir -p $(readlink -m "$USERHOME/.ssh/") + while ! [ -e /var/lib/live/config/opensshkeys ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for getsshhostkeysfrommedia to finish." + sleep 2 + done - # any keyfile in the config dir will be copied over to live system + # Homedir of user account # - for KEYFILE in $1/config/ssh/* $1/ssh $1/.ssh ; do - [ -s "$KEYFILE" ] || continue - KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")" - touch "$KEYDESTPATH" - chown user:user \ - $KEYDESTPATH - chmod 600 $KEYDESTPATH - cat $(readlink -m "$KEYFILE")>$KEYDESTPATH + USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }') - done + # nudge automounter, in case device was already plugged in at power-up + if udevadm trigger --action=add ; then + echo -n "\n$(date +'%F | %T | ')'$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 + else + echo -n "\n$(date +'%F | %T | ')'$0' Error while nudging udev-automounter." | tee -a /dev/tty8 + fi - # this is so the path name in the sessions file matches again - # (cannot use .ssh on FAT, for example) - # - ln -s $USERHOME/.ssh $USERHOME/ssh - - return 0 - else - return 1 - fi - } - - for BLOCKDEV in $BLOCKDEVS; do - NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") - if [ -n "$NEXTDEVICE" ] ; then - MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') - NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') - - if [ -n "$MNTPT" ] ; then - # echo "$NEXTDEVICE is mounted at: $MNTPT" - check_for_config $MNTPT && exit 0 - else - # echo "$NEXTDEVICE is not mounted" - if grep -q "^0$" /sys/block/*/removable ; then - # echo "Is fixed disk, mounting" - mkdir -p /media/fixeddisks/$NEXTDEVICE - mount /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE - check_for_config /media/fixeddisks/$NEXTDEVICE && exit 0 + # list devices (and mountpoints, if present) + X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') + + # support for legacy label value + PORTABLEAPPLABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}') + + # block device list, removable first (we want USB media to be able to override keys on fixed disks) + BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') + + check_for_config (){ + if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1//ssh', or '$1/./ssh'." | tee -a /dev/tty8 + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$USERHOME/.ssh/") + + # any keyfile in the config dir will be copied over to live system + # + for KEYFILE in $1/config/ssh/* $1/ssh $1/.ssh ; do + [ -s "$KEYFILE" ] || continue + KEYDESTPATH="$USERHOME/.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 $USERHOME/.ssh $USERHOME/ssh + + return 0 + else + return 1 + fi + } + + for BLOCKDEV in $BLOCKDEVS; do + NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") + if [ -n "$NEXTDEVICE" ] ; then + MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + + if [ -n "$MNTPT" ] ; then + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + if check_for_config $MNTPT ; then + touch /var/lib/live/config/opensshclientkeys + exit 0 + fi else - # echo "Is removable disk, not mounted by automounter -> don't touch" - : + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + if grep -q "^0$" /sys/block/*/removable ; then + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + mkdir -p /media/fixeddisks/$NEXTDEVICE + mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + if check_for_config /media/fixeddisks/$NEXTDEVICE ; then + umount /media/fixeddisks/$NEXTDEVICE + touch /var/lib/live/config/opensshclientkeys + exit 0 + fi + umount /media/fixeddisks/$NEXTDEVICE + else + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 + : + fi fi fi - fi - done + done + touch /var/lib/live/config/opensshclientkeys + ) & } GetSSHClientKeysFromMedia -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d7df25291948adcb4dfa587b062414139e511f6d Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:40:42 2017 +0100 added check for already-running sshd --- .../lib/live/config/2260-getsshhostkeysfrommedia | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index b96f0aa..96d56de 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -63,12 +63,16 @@ GetSSHHostKeysFromMedia () fi else - # reload sshd config - echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 - if service ssh reload ; then - echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8 + if ps -C sshd >/dev/null 2>&1 ; then + # reload sshd config + echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8 + if service ssh reload ; then + echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8 + else + echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8 + fi else - echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8 + echo -n "\n$(date +'%F | %T | ')'$0' sshd not running (yet), so no reloading required." | tee -a /dev/tty8 fi fi 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 7daa9590a15837609200df2083f6384e830b95f2 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 21:47:38 2017 +0100 wildcards were missing for additional directories --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index e92a176..a8df481 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -53,7 +53,7 @@ GetSSHClientKeysFromMedia () # any keyfile in the config dir will be copied over to live system # - for KEYFILE in $1/config/ssh/* $1/ssh $1/.ssh ; do + for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do [ -s "$KEYFILE" ] || continue KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")" touch "$KEYDESTPATH" -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 285129165304d74cdd5e2bcf213dc51e79c8a47d Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:28:04 2017 +0100 separate umount added, for when the condition isn't matched --- config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 1 + 1 file changed, 1 insertion(+) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index aad3b9d..553ea3b 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -93,6 +93,7 @@ GetSSHHostKeysFromMedia () mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE check_for_config /media/fixeddisks/$NEXTDEVICE && umount /media/fixeddisks/$NEXTDEVICE && exit 0 + umount /media/fixeddisks/$NEXTDEVICE else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit d7bdc27533d8a9d589fd0e92c0bd9a2c45c28125 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:34:51 2017 +0100 added "finished" marker --- .../lib/live/config/2260-getsshhostkeysfrommedia | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia index 553ea3b..b96f0aa 100755 --- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia @@ -85,14 +85,21 @@ GetSSHHostKeysFromMedia () if [ -n "$MNTPT" ] ; then echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 - check_for_config $MNTPT && exit 0 + if check_for_config $MNTPT ; then + touch /var/lib/live/config/opensshkeys + exit 0 + fi else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 if grep -q "^0$" /sys/block/*/removable ; then echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 mkdir -p /media/fixeddisks/$NEXTDEVICE mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE - check_for_config /media/fixeddisks/$NEXTDEVICE && umount /media/fixeddisks/$NEXTDEVICE && exit 0 + if check_for_config /media/fixeddisks/$NEXTDEVICE ; then + umount /media/fixeddisks/$NEXTDEVICE + touch /var/lib/live/config/opensshkeys + exit 0 + fi umount /media/fixeddisks/$NEXTDEVICE else echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 @@ -101,6 +108,7 @@ GetSSHHostKeysFromMedia () fi fi done + touch /var/lib/live/config/opensshkeys ) & } -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit fc711b9dd74be5945fce21b914f5f1da6eadec11 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 23:23:24 2017 +0100 added checks so only keyfiles are copied --- config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index a8df481..19ebfbe 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -54,7 +54,9 @@ GetSSHClientKeysFromMedia () # any keyfile in the config dir will be copied over to live system # for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do - [ -s "$KEYFILE" ] || continue + ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue + egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | tee -a /dev/tty8 KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")" touch "$KEYDESTPATH" chown user:user \ -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e7f23a13f82b8d334be265677053307d55cb06ba Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 23:32:49 2017 +0100 added check so key copy routine only runs when "copysecring" boot parameter is set --- .../lib/live/config/2270-getsshclientkeysfrommedia | 190 +++++++++++---------- 1 file changed, 96 insertions(+), 94 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia index 19ebfbe..3bbf516 100755 --- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia +++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia @@ -6,110 +6,112 @@ GetSSHClientKeysFromMedia () # Output startup message # echo -n " getsshclientkeysfrommedia" - ( - - # This script is for using the iso-hybrid image along with the "second partition" patch - # or other suitable storage media. When used with the iso-hybrid image for X2Go in portable mode, - # 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. - # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. - - while ! [ -c /dev/tty8 ] ; do - echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." - sleep 2 - done - - while ! [ -e /var/lib/live/config/opensshkeys ] ; do - echo -n "\n$(date +'%F | %T | ')'$0' is waiting for getsshhostkeysfrommedia to finish." - sleep 2 - done - - # Homedir of user account - # - USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }') - - # nudge automounter, in case device was already plugged in at power-up - if udevadm trigger --action=add ; then - echo -n "\n$(date +'%F | %T | ')'$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 - else - echo -n "\n$(date +'%F | %T | ')'$0' Error while nudging udev-automounter." | tee -a /dev/tty8 - fi - - # list devices (and mountpoints, if present) - X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') - - # support for legacy label value - PORTABLEAPPLABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}') - - # block device list, removable first (we want USB media to be able to override keys on fixed disks) - BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') - - check_for_config (){ - if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1//ssh', or '$1/./ssh'." | tee -a /dev/tty8 - # create .ssh-Directory in case it doesn't exist - # - mkdir -p $(readlink -m "$USERHOME/.ssh/") - - # any keyfile in the config dir will be copied over to live system - # - for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do - ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue - egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue - echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | tee -a /dev/tty8 - KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")" - touch "$KEYDESTPATH" - chown user:user \ - $KEYDESTPATH - chmod 600 $KEYDESTPATH - cat $(readlink -m "$KEYFILE")>$KEYDESTPATH + if grep -q "\W*copysecring\W*" /proc/cmdline ; then + ( + + # This script is for using the iso-hybrid image along with the "second partition" patch + # or other suitable storage media. When used with the iso-hybrid image for X2Go in portable mode, + # 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. + # It also allows you to use USB media with your key on it together with a net-booted Debian Live, for example. + + while ! [ -c /dev/tty8 ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for tty8 to become available." + sleep 2 + done + while ! [ -e /var/lib/live/config/opensshkeys ] ; do + echo -n "\n$(date +'%F | %T | ')'$0' is waiting for getsshhostkeysfrommedia to finish." + sleep 2 done - # this is so the path name in the sessions file matches again - # (cannot use .ssh on FAT, for example) + # Homedir of user account # - ln -s $USERHOME/.ssh $USERHOME/ssh - - return 0 - else - return 1 - fi - } - - for BLOCKDEV in $BLOCKDEVS; do - NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") - if [ -n "$NEXTDEVICE" ] ; then - MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') - NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') - - if [ -n "$MNTPT" ] ; then - echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 - if check_for_config $MNTPT ; then - touch /var/lib/live/config/opensshclientkeys - exit 0 - fi - else - echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 - if grep -q "^0$" /sys/block/*/removable ; then - echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 - mkdir -p /media/fixeddisks/$NEXTDEVICE - mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE - if check_for_config /media/fixeddisks/$NEXTDEVICE ; then - umount /media/fixeddisks/$NEXTDEVICE + USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }') + + # nudge automounter, in case device was already plugged in at power-up + if udevadm trigger --action=add ; then + echo -n "\n$(date +'%F | %T | ')'$0' Successfully nudged udev-automounter." | tee -a /dev/tty8 + else + echo -n "\n$(date +'%F | %T | ')'$0' Error while nudging udev-automounter." | tee -a /dev/tty8 + fi + + # list devices (and mountpoints, if present) + X2GOTCELIVELABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3}') + + # support for legacy label value + PORTABLEAPPLABELS=$(lsblk -oLABEL,NAME,MOUNTPOINT -l | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3}') + + # block device list, removable first (we want USB media to be able to override keys on fixed disks) + BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}') + + check_for_config (){ + if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile directory found at '$1/config/ssh', '$1//ssh', or '$1/./ssh'." | tee -a /dev/tty8 + # create .ssh-Directory in case it doesn't exist + # + mkdir -p $(readlink -m "$USERHOME/.ssh/") + + # any keyfile in the config dir will be copied over to live system + # + for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do + ([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue + egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue + echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | tee -a /dev/tty8 + KEYDESTPATH="$USERHOME/.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 $USERHOME/.ssh $USERHOME/ssh + + return 0 + else + return 1 + fi + } + + for BLOCKDEV in $BLOCKDEVS; do + NEXTDEVICE=$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | grep "$BLOCKDEV") + if [ -n "$NEXTDEVICE" ] ; then + MNTPT=$(echo $NEXTDEVICE | awk '{print $2}') + NEXTDEVICE=$(echo $NEXTDEVICE | awk '{print $1}') + + if [ -n "$MNTPT" ] ; then + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is mounted at: '$MNTPT'" | tee -a /dev/tty8 + if check_for_config $MNTPT ; then touch /var/lib/live/config/opensshclientkeys exit 0 fi - umount /media/fixeddisks/$NEXTDEVICE else - echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 - : + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is not mounted." | tee -a /dev/tty8 + if grep -q "^0$" /sys/block/*/removable ; then + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a fixed disk, mounting ..." | tee -a /dev/tty8 + mkdir -p /media/fixeddisks/$NEXTDEVICE + mount -o ro /dev/$NEXTDEVICE /media/fixeddisks/$NEXTDEVICE + if check_for_config /media/fixeddisks/$NEXTDEVICE ; then + umount /media/fixeddisks/$NEXTDEVICE + touch /var/lib/live/config/opensshclientkeys + exit 0 + fi + umount /media/fixeddisks/$NEXTDEVICE + else + echo -n "\n$(date +'%F | %T | ')'$0' Device '$NEXTDEVICE' is a removable disk, not mounted by automounter, skipping." | tee -a /dev/tty8 + : + fi fi fi - fi - done - touch /var/lib/live/config/opensshclientkeys - ) & + done + touch /var/lib/live/config/opensshclientkeys + ) & + fi } GetSSHClientKeysFromMedia -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit a45f251bddf68e498dbbcceb638be45c26c4a96e Author: Stefan Baur <kontakt@baur-itcs.de> Date: Wed Nov 8 09:10:41 2017 +0100 temporary x2go archive path change due to server maintenance --- 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..a1dbe8e 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://snapshots.packages.x2go.org/20171107/debian jessie main -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit bd7a9e7051daa26656b61b9542f1f65158ab1071 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Nov 9 09:14:54 2017 +0100 added '@' as allowed character in broker URL, sessionselect, and LDAP parameters --- .../includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 5344fe2..841ff9a 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -91,22 +91,22 @@ xsetroot -solid "#246ed8" # Get X2GoConfig BROKERURL=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ awk -F'=' ' /^broker-url=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:/?%_\-') + tr -dc 'a-zA-Z0-9.:/?%_\-@') SESSIONSELECT=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ awk -F'=' ' /^session=/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:/ _\-') + tr -dc 'a-zA-Z0-9.:/ _\-@') LDAP=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ sed 's/^ldap=/ldap#/' | \ awk -F'#' ' /^ldap#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-') + tr -dc 'a-zA-Z0-9.:_\-@') LDAP1=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ sed 's/^ldap1=/ldap1#/' | \ awk -F'#' ' /^ldap1#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-') + tr -dc 'a-zA-Z0-9.:_\-@') LDAP2=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' /proc/cmdline | \ sed 's/^ldap2=/ldap2#/' | \ awk -F'#' ' /^ldap2#/ { print \$2 }' | \ - tr -dc 'a-zA-Z0-9.:_\-') + tr -dc 'a-zA-Z0-9.:_\-@') # Check for background and branding SVGs -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 3fe907a88f3380d1190f095394ce6b74e0fd85e5 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sat Nov 11 13:53:33 2017 +0100 added required dependencies for previously added package --- config/package-lists/x2go.list.chroot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index a8ed83d..81d39b3 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -1,5 +1,6 @@ cryptsetup freerdp-x11 +iso-codes libfile-path-expand-perl libfreerdp-cache1.1 libfreerdp-client1.1 @@ -13,6 +14,8 @@ libfreerdp-plugins-standard libfreerdp-primitives1.1 libfreerdp-rail1.1 libfreerdp-utils1.1 +libgstreamer0.10-0 +libgstreamer-plugins-base0.10-0 libjpeg62-turbo libssl1.0.0 libwinpr-crt0.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/openbox-magic-pixel-workaround in repository live-build-x2go. commit bb1e83f3fcd2cd0bdcef09be739f8fab6f524dd5 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sat Nov 11 13:46:41 2017 +0100 added libfreerdp-plugins-standard so drive forwarding works with xfreerdp --- config/package-lists/x2go.list.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/config/package-lists/x2go.list.chroot b/config/package-lists/x2go.list.chroot index 06348e5..a8ed83d 100644 --- a/config/package-lists/x2go.list.chroot +++ b/config/package-lists/x2go.list.chroot @@ -9,6 +9,7 @@ libfreerdp-core1.1 libfreerdp-crypto1.1 libfreerdp-gdi1.1 libfreerdp-locale1.1 +libfreerdp-plugins-standard libfreerdp-primitives1.1 libfreerdp-rail1.1 libfreerdp-utils1.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/openbox-magic-pixel-workaround in repository live-build-x2go. commit bdb41cdeb6e395702d4e6d7a41be1d2c82b47bba Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sat Nov 11 22:48:05 2017 +0100 undid commit a45f251bddf68e498dbbcceb638be45c26c4a96e as repo is up again --- config/archives/x2go.list.chroot | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/archives/x2go.list.chroot b/config/archives/x2go.list.chroot index a1dbe8e..51c0819 100644 --- a/config/archives/x2go.list.chroot +++ b/config/archives/x2go.list.chroot @@ -1,2 +1 @@ -#deb http://packages.x2go.org/debian jessie main -deb http://snapshots.packages.x2go.org/20171107/debian jessie main +deb http://packages.x2go.org/debian jessie main -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit 915391fb657d54f45e7c6acffbeae6a8b5d30a0e Author: Stefan Baur <kontakt@baur-itcs.de> Date: Mon Nov 13 21:54:48 2017 +0100 Parameter nomagicpixel=1 or nomagicpixel=2 must now be set as kernel boot parameter to enable the magic-pixel-workaround. Also added alternative method to disable magic pixel. Old method is now option 2. --- .../lib/live/config/2900-x2go-thinclientconfig | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 841ff9a..7c4571c 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -219,12 +219,25 @@ if [ -n "\$THROTTLEVALUES" ]; then fi # workaround for NX "magic pixel" being active in --thinclient mode -while ! ps -C xdotool >/dev/null ; do - while [ \$(xdotool search --name . | wc -l) -lt 3 ] ; do - sleep 1 - done ; - xdotool search . behave %@ blur windowmap -done & +if grep 'nomagicpixel=2' /proc/cmdline ; then + while ! ps -C xdotool >/dev/null ; do + while [ \$(xdotool search --name . | wc -l) -lt 3 ] ; do + sleep 1 + done ; + xdotool search . behave %@ blur windowmap + done & +elif grep 'nomagicpixel=1' /proc/cmdline ; then + while true ; do + while [ $(xdotool search --name . | wc -l) -lt 3 ] && ! ps -C openbox >/dev/null ; do + openbox & + done + while [ $(xdotool search --name . | wc -l) -gt 2 ] && ps -C openbox >/dev/null ; do + killall openbox + done + done & +else + : # NOP +fi eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION XSESSION -- 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit de9ec56c42427ac3ab056c076640c04a7964100a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 14 02:11:20 2017 +0100 once again, fixed missing escapes, le sigh --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 7c4571c..c4afc84 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -228,10 +228,10 @@ if grep 'nomagicpixel=2' /proc/cmdline ; then done & elif grep 'nomagicpixel=1' /proc/cmdline ; then while true ; do - while [ $(xdotool search --name . | wc -l) -lt 3 ] && ! ps -C openbox >/dev/null ; do + while [ \$(xdotool search --name . | wc -l) -lt 3 ] && ! ps -C openbox >/dev/null ; do openbox & done - while [ $(xdotool search --name . | wc -l) -gt 2 ] && ps -C openbox >/dev/null ; do + while [ \$(xdotool search --name . | wc -l) -gt 2 ] && ps -C openbox >/dev/null ; do killall openbox done 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/openbox-magic-pixel-workaround in repository live-build-x2go. commit e4c3ad6714f33963b96d1bc546648efc01608c8a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 14 09:02:57 2017 +0100 Changed openbox spawn/terminate conditions: only exactly 3 windows mean that openbox should be terminated. Any less, and we're in "no running session yet" state, any more, and we have a running session, and e.g. a connection loss popup. --- config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index c4afc84..85fd690 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -228,10 +228,10 @@ if grep 'nomagicpixel=2' /proc/cmdline ; then done & elif grep 'nomagicpixel=1' /proc/cmdline ; then while true ; do - while [ \$(xdotool search --name . | wc -l) -lt 3 ] && ! ps -C openbox >/dev/null ; do + while [ \$(xdotool search --name . | wc -l) -ne 3 ] && ! ps -C openbox >/dev/null ; do openbox & done - while [ \$(xdotool search --name . | wc -l) -gt 2 ] && ps -C openbox >/dev/null ; do + while [ \$(xdotool search --name . | wc -l) -eq 3 ] && ps -C openbox >/dev/null ; do killall openbox done 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