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. discards 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. discards de9ec56 once again, fixed missing escapes, le sigh discards 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. discards bdb41cd undid commit a45f251bddf68e498dbbcceb638be45c26c4a96e as repo is up again discards 3fe907a added required dependencies for previously added package discards bb1e83f added libfreerdp-plugins-standard so drive forwarding works with xfreerdp discards bd7a9e7 added '@' as allowed character in broker URL, sessionselect, and LDAP parameters discards a45f251 temporary x2go archive path change due to server maintenance discards e7f23a1 added check so key copy routine only runs when "copysecring" boot parameter is set discards fc711b9 added checks so only keyfiles are copied discards 7daa959 wildcards were missing for additional directories discards bcacbef changed routine to be more like GetSSHHostKeysFromMedia, also, added check so it waits until GetSSHHostKeysFromMedia is done discards d7df252 added check for already-running sshd discards d7bdc27 added "finished" marker discards 2851291 separate umount added, for when the condition isn't matched discards 0d41297 added umount command for self-mounted devices discards baa5147 removed unneccessary escapes discards 4ed72eb backgrounded entire task, added error checks and log output discards ce0d2b4 dash's echo does not understand -e, thus removed discards 1c382d7 fixed syntax error stemming from copypasta discards c62e517 executable bit was missing discards ca52885 make sure file permissions are correct, even when copying from vfat; make sure all keys are generated before storing on media discards 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 discards 8d58936 added script to add and store SSH host keys when proper media is present discards 6799f3f fixed missing escape (when will I ever learn ...) discards d9ae0c9 workaround wasn't working, swapped out for now-working code discards 767520f changed file name as it didn't contain ".list" and thus seems to have been ignored discards 225b4c9 added workaround for NX "magic pixel" being active in --thinclient mode new ca187d4 added script to add and store SSH host keys when proper media is present new 945cabd 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 6210f63 make sure file permissions are correct, even when copying from vfat; make sure all keys are generated before storing on media new 7aa953d executable bit was missing new 0c35e74 fixed syntax error stemming from copypasta new 9f875e0 dash's echo does not understand -e, thus removed new 29b8c26 backgrounded entire task, added error checks and log output new e57f51b removed unneccessary escapes new 678bb00 added umount command for self-mounted devices new c11942a separate umount added, for when the condition isn't matched new 787b0c6 added "finished" marker new 488e70e added check for already-running sshd new 5d9d8f8 changed routine to be more like GetSSHHostKeysFromMedia, also, added check so it waits until GetSSHHostKeysFromMedia is done new 75484b1 wildcards were missing for additional directories new 55efbbb added checks so only keyfiles are copied new 8e4c174 added check so key copy routine only runs when "copysecring" boot parameter is set new dc90ad3 added '@' as allowed character in broker URL, sessionselect, and LDAP parameters new a62ef3c added libfreerdp-plugins-standard so drive forwarding works with xfreerdp new 9abe10d added required dependencies for previously added package new 7c6088f added workaround for NX "magic pixel" being active in --thinclient mode new 483eae9 changed file name as it didn't contain ".list" and thus seems to have been ignored new a25ec3e workaround wasn't working, swapped out for now-working code new 4a1f3fc fixed missing escape (when will I ever learn ...) new 3579ceb temporary x2go archive path change due to server maintenance new 9c081ab undid commit a45f251bddf68e498dbbcceb638be45c26c4a96e as repo is up again new e7ba87a 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 b50aee6 once again, fixed missing escapes, le sigh new b494afb 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 update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (e4c3ad6) \ N -- N -- N refs/heads/feature/openbox-magic-pixel-workaround (b494afb) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 28 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. Summary of changes: -- Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.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 945cabd5d2afe9b4999779d855c6cee8970a8b09 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 14:39:29 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 ca187d44b8b1cce2c69744f1ddf68bad1f043331 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 14:04:47 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 7aa953d5748aa8a2f8bfb836da96cd8a736b1c5b Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 16:19:46 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 6210f638032bcbc46d91ee7072073ab9804572d9 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 16:17:02 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 0c35e7443045594931a70a607124775221e84fe7 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 16:24:43 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 29b8c268a76a022621d4de9f71fa4783cc198aa9 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 19:10:17 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 678bb00437c0591ac36432b9269e61494e014c8c Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:26:17 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 e57f51b0ca11f15e02d4f17796b504261ec4c758 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:21:48 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 c11942a74d7c0fcea42bcd8324ca079c8e1dbd73 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:29:15 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 787b0c67e6a5597a96d38106526e45abf029f792 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:35:28 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 5d9d8f8ed9b3254587e5204a05f01749902e468c Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 21:01:23 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 488e70e7419a99becb2246af6bfa7be112364856 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 20:41:28 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 9f875e0087e009eaa47cefa27acefeba235ad949 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 17:25:54 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 8e4c1743743dd1262897ccb25e72b6120ea2e08d Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 23:34:41 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 a62ef3cb8883edee2eddf85e21c54732eaede9fe Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sat Nov 11 13:48:01 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 9abe10d48e385abcf2b812ca31d7e6ab5e02772e Author: Stefan Baur <kontakt@baur-itcs.de> Date: Sat Nov 11 13:54:29 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 dc90ad39c12cc6b284df7985c06431e2e6f0abe0 Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Nov 9 09:17:06 2017 +0100 added '@' as allowed character in broker URL, sessionselect, and LDAP parameters --- .../lib/live/config/2900-x2go-thinclientconfig | 18 +++++++++++++----- 1 file changed, 13 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 e846424..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 @@ -218,6 +218,14 @@ if [ -n "\$THROTTLEVALUES" ]; then fi 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 & + 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 75484b1957997ba3dffc9bab0d606bbfcca34b8a Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 21:48:37 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 55efbbb602332fd8c803b108855817c9a3dd983e Author: Stefan Baur <kontakt@baur-itcs.de> Date: Tue Nov 7 23:25:29 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 a25ec3ee38423c1be78bb373849450b414f58c5b 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 cb95953..9bc268e 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 3579cebe002a3f192e23e553e331145877ccd6a8 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 9c081abac875b13d442e9208ae2b2433d60ce4ff 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 b50aee650afa20392d64ad4e122a7ba8d53dd863 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 e7ba87a6819dab42ba48ad52d67c3bbafc81afd6 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 4a1f3fcd4884b236e0d53348447f24f9808c1f02 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 9bc268e..841ff9a 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 7c6088f7b772bf9ad2b0b19e160caaa3674fe06b 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 | 7 ++----- config/package-lists/magic-pixel-workaround.chroot | 3 +++ 2 files 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 841ff9a..cb95953 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -219,11 +219,8 @@ 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 +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 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 483eae9e1f1d00f9152dcd165eb9a8b80f753698 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 b494afb36e18705328f4cb8c535f67721401f3eb 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