From 39ae328c035ac8928049fff0dc346418677656f8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 6 Dec 2013 11:03:00 -0500 Subject: login: be more verbose about GPG --- .config/login.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/login.sh b/.config/login.sh index 3dad752..8f06b63 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -1,3 +1,4 @@ + #!/bin/bash # ~/.profile: executed by the command interpreter for login shells. # Should be whether logging in graphically or not. @@ -41,13 +42,17 @@ fi # GPG if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then + echo 'login: Setting GPGKEY' export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && [[ -n $XDG_RUNTIME_DIR ]] && type gpg-agent &>/dev/null; then + echo 'login: Starting gpg-agent' mkdir -p "${XDG_RUNTIME_DIR}/sessions" - gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" &>/dev/null + gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" >/dev/null fi if [[ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]]; then + echo 'login: Setting gpg-agent info:' + cat "${XDG_RUNTIME_DIR}/sessions/gpg" . "${XDG_RUNTIME_DIR}/sessions/gpg" export GPG_AGENT_INFO #export SSH_AUTH_SOCK -- cgit v1.2.3