From b04d4b6d5072ca83e852dff8c561f6a5e13267e4 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 23 Sep 2014 01:31:23 +0200 Subject: [PATCH] =?UTF-8?q?Tentative=20de=20pallier=20=C3=A0=20un=20foncti?= =?UTF-8?q?onnement=20bizarre=20de=20keychain=20...=20Vient=20en=20compl?= =?UTF-8?q?=C3=A9ment=20de=20c542dee1b=20sur=20https://git.101010.fr/dotfi?= =?UTF-8?q?les-gardouille/scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zlogin | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/zlogin b/zlogin index 45cfe1c..2ad33a8 100644 --- a/zlogin +++ b/zlogin @@ -32,17 +32,6 @@ mesg y #esac -# Lancement de ssh-agent -if [ ${USER} != "root" ]; then - if [ ! -f ~/.keychain/$HOST-sh ]; then - keychain --clear ~/.ssh/id_rsa - fi - source ~/.keychain/$HOST-sh -fi -#keychain ~/.ssh/id_rsa -#source ~/.keychain/$HOST-sh - - ## Génération du fichier ~/.ssh/config if [ -f ~/.ssh/config_00base ]; then rm -f ~/.ssh/config @@ -74,3 +63,19 @@ if [ ${USER} != "root" ]; then fi fi fi + + +# Launch Keychain for ssh +if [ -f $HOME/.keychain/$HOST-sh ]; then + . $HOME/.keychain/$HOST-sh +else + if [ -f $HOME/.ssh/id_rsa ]; then + keychain --agents ssh id_rsa + . $HOME/.keychain/$HOST-sh + fi +fi + +# Launch Keychain for GPG +#[ -f $HOME/.keychain/$HOST-sh-gpg ] && \ + #. $HOME/.keychain/$HOST-sh-gpg +