aboutsummaryrefslogtreecommitdiff
path: root/network/x11-ssh-askpass/xprofile.sample
diff options
context:
space:
mode:
Diffstat (limited to 'network/x11-ssh-askpass/xprofile.sample')
-rw-r--r--network/x11-ssh-askpass/xprofile.sample14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/x11-ssh-askpass/xprofile.sample b/network/x11-ssh-askpass/xprofile.sample
new file mode 100644
index 0000000000000..dce0eae0caeda
--- /dev/null
+++ b/network/x11-ssh-askpass/xprofile.sample
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+usessh=${usessh:-yes}
+
+if test "$usessh" = "yes" -a -d $HOME/.ssh ; then
+ SSH_ASKPASS="/usr/libexec/x11-ssh-askpass"
+ if [ -x $SSH_ASKPASS ] ; then
+ export SSH_ASKPASS
+ ssh-agent > $HOME/.ssh/agent
+ . $HOME/.ssh/agent
+ ssh-add
+ fi
+fi
+