Skip to content

Commit

Permalink
Merge pull request #5038: ceph-post-file fails on rhel7
Browse files Browse the repository at this point in the history
Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
ldachary committed Jul 15, 2015
2 parents ccc6bf7 + 22f58ce commit adffee0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Expand Up @@ -20,9 +20,9 @@ EXTRA_DIST += \
# why is it so hard to make autotools to this?
install-data-local:
-mkdir -p $(DESTDIR)$(datadir)/ceph
-install -m 644 share/known_hosts_drop.ceph.com $(DESTDIR)$(datadir)/ceph/known_hosts_drop.ceph.com
-install -m 644 share/id_dsa_drop.ceph.com $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com
-install -m 644 share/id_dsa_drop.ceph.com.pub $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com.pub
-install -m 600 share/known_hosts_drop.ceph.com $(DESTDIR)$(datadir)/ceph/known_hosts_drop.ceph.com
-install -m 600 share/id_dsa_drop.ceph.com $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com
-install -m 600 share/id_dsa_drop.ceph.com.pub $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com.pub

all-local:
if WITH_DEBUG
Expand Down
20 changes: 10 additions & 10 deletions src/ceph-post-file.in
@@ -1,16 +1,16 @@
#!/bin/bash -e

# if we start up as ./$0, assume we are running from a source
# checkout.
if [ `dirname $0` = "." ] && [ $PWD != "/usr/bin" ]; then
known_hosts=../share/known_hosts_drop.ceph.com
ssh_key=../share/id_dsa_drop.ceph.com
else
known_hosts=@datadir@/known_hosts_drop.ceph.com
ssh_key=@datadir@/id_dsa_drop.ceph.com
# If these files exist, assume we are a source install.
if [[ -f ../share/known_hosts_drop.ceph.com && -f ../share/id_dsa_drop.ceph.com ]]
then # running from source install
known_hosts=../share/known_hosts_drop.ceph.com
ssh_key=../share/id_dsa_drop.ceph.com
else # running from a pkg install
known_hosts=@datadir@/known_hosts_drop.ceph.com
ssh_key=@datadir@/id_dsa_drop.ceph.com
fi

usage() {
function usage() {
echo "Usage: $0 [options] file1 [dir2 ...]
Easily upload files or directories to ceph.com for analysis by Ceph
Expand Down Expand Up @@ -155,7 +155,7 @@ done
cp "$ssh_key" "$t4"
cp "${ssh_key}.pub" "$t4.pub"

sftp -i $t4 \
sftp -o "IdentityFile=$t4" \
-C \
-oCheckHostIP=no \
-oGlobalKnownHostsFile=$known_hosts \
Expand Down

0 comments on commit adffee0

Please sign in to comment.