blob: e6ae21e315591d470823dbd0208702d159c73974 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Description: ssh-copy-id: Check exit status of 'ssh-add -L'
This fixes behaviour when an agent is running with no identities loaded.
Author: Adeodato Simó <asp16@alu.ua.es>
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1723
Bug-Debian: http://bugs.debian.org/221675
Last-Update: 2010-02-27
Index: b/contrib/ssh-copy-id
===================================================================
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -19,7 +19,7 @@
shift # and this should leave $1 as the target name
fi
else
- if [ x$SSH_AUTH_SOCK != x ] ; then
+ if [ x$SSH_AUTH_SOCK != x ] && ssh-add -L >/dev/null 2>&1; then
GET_ID="$GET_ID ssh-add -L"
fi
fi
|