2015-02-18 15:01:02 +00:00
|
|
|
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
|
|
|
|
index 8e1091c..4bba5d6 100644
|
|
|
|
--- a/contrib/ssh-copy-id
|
|
|
|
+++ b/contrib/ssh-copy-id
|
2015-05-18 13:09:51 +00:00
|
|
|
@@ -274,9 +274,7 @@ case "$REMOTE_VERSION" in
|
2015-02-18 15:01:02 +00:00
|
|
|
populate_new_ids 0
|
|
|
|
fi
|
|
|
|
[ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" "
|
|
|
|
- umask 077 ;
|
2015-05-18 13:09:51 +00:00
|
|
|
+ exec sh -c 'umask 077; mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1; if type restorecon >/dev/null 2>&1; then restorecon -F .ssh .ssh/authorized_keys; fi'" \
|
|
|
|
- mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ;
|
2015-02-18 15:01:02 +00:00
|
|
|
- if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" \
|
|
|
|
|| exit 1
|
|
|
|
ADDED=$(printf '%s\n' "$NEW_IDS" | wc -l)
|
|
|
|
;;
|