[X2Go-Commits] [live-build-x2go] 01/18: added debug/log code as the secret key file copying doesn't seem to work on Debian stretch

git-admin at x2go.org git-admin at x2go.org
Wed Jan 24 18:08:44 CET 2018


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

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

commit 6cb8ed187216e058328cf377ce0b69bc37635638
Author: Stefan Baur <kontakt at baur-itcs.de>
Date:   Wed Dec 6 18:56:06 2017 +0100

    added debug/log code as the secret key file copying doesn't seem to work on Debian stretch
---
 .../lib/live/config/2270-getsshclientkeysfrommedia                | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
index 3bbf516..f6120d5 100755
--- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
@@ -43,7 +43,11 @@ GetSSHClientKeysFromMedia ()
 			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}')
+			BLOCKDEVLOOPCOUNT=0 # this is for debugging/logging; it seems the blockdevs list is empty on Debian stretch
+			while [ -z "$BLOCKDEVS" ] ; do
+				BLOCKDEVS=$(grep -H '' /sys/block/*/removable | awk -F':' '{ print $2 ":" $1}' | sort -r | awk -F'/' '{print $4}')
+				BLOCKDEVLOOPCOUNT=$((BLOCKDEVLOOPCOUNT+1))
+			done
 
 			check_for_config (){
 			if [ -d $1/config/ssh ] || [ -d $1/ssh ] || [ -d $1/.ssh ]; then
@@ -109,7 +113,7 @@ GetSSHClientKeysFromMedia ()
 					fi
 				fi
 			done
-			touch /var/lib/live/config/opensshclientkeys
+			echo "BLOCKDEVS: '$BLOCKDEVS'" > /var/lib/live/config/opensshclientkeys
 		) &
 	fi
 }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list