[Xfce4-commits] <xfce4-session:nick/shutdown-cleanup> Drop gpg-agent and ssh-agent handling.
Nick Schermer
noreply at xfce.org
Sat Feb 25 11:04:01 CET 2012
Updating branch refs/heads/nick/shutdown-cleanup
to b6c8ca513166fd96229c8ba945fa43035c2df407 (commit)
from e5da6d477ac0d4a1e1de322b52f1fb9721af9571 (commit)
commit b6c8ca513166fd96229c8ba945fa43035c2df407
Author: Nick Schermer <nick at xfce.org>
Date: Fri Feb 24 22:31:09 2012 +0100
Drop gpg-agent and ssh-agent handling.
I want to change the handling of dbus-launch a bit, which
means we cannot rely on dbus stuff in xinit.
Drop this and add it in a better way later.
scripts/xinitrc.in.in | 60 -------------------------------------------------
1 files changed, 0 insertions(+), 60 deletions(-)
diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index bfef2ca..a5afc24 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -100,70 +100,10 @@ if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
fi
fi
-# launch gpg-agent or ssh-agent if enabled.
-ssh_agent_enabled=`xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled 2> /dev/null`
-if test "$ssh_agent_enabled" != "false"; then
- # if the user has pam_ssh installed, it will start ssh-agent for us, but
- # of course won't start gpg-agent. so, if ssh-agent is already running,
- # but we want gpg-agent (and that's not running yet) start gpg-agent
- # without ssh support
-
- ssh_agent_type=`xfconf-query -c xfce4-session -p /startup/ssh-agent/type 2> /dev/null`
- if test -z "$ssh_agent_type"; then
- if which gpg-agent >/dev/null 2>&1; then
- ssh_agent_type=gpg-agent
- else
- ssh_agent_type=ssh-agent
- fi
- fi
-
- # ignore stale ssh-agents
- if test "$SSH_AGENT_PID"; then
- if ! kill -0 $SSH_AGENT_PID; then
- unset SSH_AGENT_PID
- unset SSH_AUTH_SOCK
- fi
- fi
-
- case "$ssh_agent_type" in
- gpg-agent)
- if test -z "$SSH_AGENT_PID"; then
- eval `gpg-agent --daemon --enable-ssh-support --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
- ssh_agent_kill_cmd="kill -INT $SSH_AGENT_PID; rm -f $XDG_CACHE_HOME/gpg-agent-info"
- elif test -z "$GPG_AGENT_INFO"; then
- echo "ssh-agent is already running; starting gpg-agent without ssh support"
- eval `gpg-agent --daemon --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
- ssh_agent_kill_cmd="pkill -INT ^gpg-agent\$; rm -f $XDG_CACHE_HOME/gpg-agent-info"
- else
- echo "gpg-agent is already running"
- fi
- ;;
-
- ssh-agent)
- if test -z "$SSH_AGENT_PID"; then
- eval `ssh-agent -s`
- ssh_agent_kill_cmd="ssh-agent -s -k"
- else
- echo "ssh-agent is already running"
- fi
- ;;
-
- *)
- echo "Unrecognized agent type '$ssh_agent_type'" >&2
- ;;
- esac
-fi
-
-
# Run xfce4-session if installed
if which xfce4-session >/dev/null 2>&1; then
xfce4-session
- if test "$ssh_agent_kill_cmd"; then
- echo "running '$ssh_agent_kill_cmd'"
- eval "$ssh_agent_kill_cmd"
- fi
-
exit 0
fi
More information about the Xfce4-commits
mailing list