[X2Go-Commits] [live-build-x2go] 02/18: added code so secret key file copying should also work for MATE-MiniDesktop
git-admin at x2go.org
git-admin at x2go.org
Wed Jan 24 18:08:45 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 58cc432ecc6546cd97627771c749db6be3b08f85
Author: Stefan Baur <kontakt at baur-itcs.de>
Date: Wed Dec 6 19:06:10 2017 +0100
added code so secret key file copying should also work for MATE-MiniDesktop
---
.../lib/live/config/2270-getsshclientkeysfrommedia | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
index f6120d5..f840b62 100755
--- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
@@ -26,8 +26,16 @@ GetSSHClientKeysFromMedia ()
done
# Homedir of user account
- #
- USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }')
+ # if we're a MATE-MiniDesktop, let this be our homedirectory
+ USERHOME=$(getent passwd x2gothinclient | awk -F':' '{ print $6 }')
+ # No Match? Then we're a regular TCE-Live.
+ if [ -z "$USERHOME" ] ; then
+ USERHOME=$(getent passwd 1000 | awk -F':' '{ print $6 }')
+ TARGETUSERNAME="x2gothinclient"
+ else
+ # let's not forget to set the target user name if we're no MATE-MiniDesktop
+ TARGETUSERNAME=$(getent passwd 1000 | awk -F':' '{ print $1 }')
+ fi
# nudge automounter, in case device was already plugged in at power-up
if udevadm trigger --action=add ; then
@@ -64,7 +72,7 @@ GetSSHClientKeysFromMedia ()
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 \
+ chown $TARGETUSERNAME: \
$KEYDESTPATH
chmod 600 $KEYDESTPATH
cat $(readlink -m "$KEYFILE")>$KEYDESTPATH
--
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