Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: ceph-post-file fails on rhel7 #5038

Merged
3 commits merged into from Jul 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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