From 90469031eeb86bc087ed1fb265c3f59e4212a38d Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Wed, 1 Jul 2015 19:05:41 +0200 Subject: [PATCH] ssh-copy-id: tcsh doesnt work with multiline strings so we will make it uggly one-line --- openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch b/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch index f6997a2..358986b 100644 --- a/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch +++ b/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch @@ -2,15 +2,14 @@ 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 -@@ -274,9 +274,9 @@ case "$REMOTE_VERSION" in +@@ -274,9 +274,7 @@ case "$REMOTE_VERSION" in populate_new_ids 0 fi [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" " - umask 077 ; -+ exec sh -c 'umask 077 ; - mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; ++ 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 ; - if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" \ -+ 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) ;;