SSH: ssh-agent fix.

master
Pierre Neidhardt 2013-01-09 19:45:23 +01:00
parent ab84bb6440
commit bdb2c53192
2 changed files with 9 additions and 3 deletions

View File

@ -98,12 +98,16 @@ export EDITOR
#esac #esac
## SSH-Agent ## SSH-Agent
SSH_DEST_FOLDER="/tmp/ssh-agent_env"
if [ $(ps ax -o command="" | grep -c "ssh-agent") -eq 1 ]; then if [ $(ps ax -o command="" | grep -c "ssh-agent") -eq 1 ]; then
SSH_AGENT_VARS=$(ssh-agent) SSH_AGENT_VARS=$(ssh-agent)
eval $(echo ${SSH_AGENT_VARS}) eval $(echo ${SSH_AGENT_VARS})
echo ${SSH_AGENT_VARS} | sed '2q' > "$HOME/.ssh/agent_env" echo ${SSH_AGENT_VARS} | sed '2q' > "$SSH_DEST_FOLDER"
chmod 444 "$SSH_DEST_FOLDER"
unset $SSH_DEST_FOLDER
unset $SSH_AGENT_VARS unset $SSH_AGENT_VARS
else else
eval $(cat "$HOME/.ssh/agent_env") eval $(cat "$SSH_DEST_FOLDER")
unset $SSH_DEST_FOLDER
fi fi

4
README
View File

@ -1,7 +1,7 @@
################################################################################ ################################################################################
# Unix Home Configuration # # Unix Home Configuration #
# Author: Ambrevar # # Author: Ambrevar #
# Date: 2012-12-05 # # Date: 2013-01-09 #
################################################################################ ################################################################################
Synopsis Synopsis
@ -59,6 +59,8 @@ Emacs
***** *****
Extra deps: emacs-lua-mode, emacs-mediawiki, emacs-yasnippet. Extra deps: emacs-lua-mode, emacs-mediawiki, emacs-yasnippet.
Emacs daemon is integrated flawlessly thanks to a small script. See .homeinit.
Configuration for C programming. Bindings to compile either from makefile or Configuration for C programming. Bindings to compile either from makefile or
from a custom command if no makefile is found. from a custom command if no makefile is found.