]> arthur.barton.de Git - ConfigScripts.git/blobdiff - sys/bashrc
Add support for keychain(1) ssh-agent and gpg-agent helper
[ConfigScripts.git] / sys / bashrc
index b65ff999af1d3101596266a03566331fa24e0565..911327fde5db176465cdb5f1cc6c925825742fc5 100644 (file)
@@ -9,6 +9,10 @@ BASHRCREAD="true"
 
 [ -z "$PROFILEREAD" -a -r /etc/profile ] && source /etc/profile
 
+# Initialize keychain(1) ssh-agent and gpg-agent helper
+type keychain >/dev/null 2>&1 \
+       && eval `keychain --agents ssh --eval --quick --quiet`
+
 # Interactive shell?
 [ "$PS1" ] || return
 
@@ -184,6 +188,6 @@ esac
 # Source local files, if readable
 [ -r "/etc/bashrc.local" ] && source /etc/bashrc.local
 [ -r "/etc/bash.bashrc.local" ] && source /etc/bash.bashrc.local
-[ -r "/var/lib/$ME/bash.bashrc" ] && source /var/lib/$ME/bash.bashrc
+[ -r "/var/lib/$HOSTNAME/bash.bashrc" ] && source /var/lib/$HOSTNAME/bash.bashrc
 
 # -eof-