usr/sbin/mkcephfs
usr/lib/ceph/ceph_common.sh
etc/ceph/sample.ceph.conf
+etc/ceph/sample.fetch_config
usr/share/man/man8/cmon.8
usr/share/man/man8/cmds.8
usr/share/man/man8/cosd.8
$(MAKE) DESTDIR=$(CURDIR) install
mkdir -p etc/ceph
- cp src/sample.ceph.conf etc/ceph
+ mv usr/etc/ceph/* etc/ceph
# Add here commands to install the package into debian/testpack.
$(install_sh_SCRIPT) -m 0755 ceph_common.sh $(DESTDIR)$(libdir)/ceph/ceph_common.sh
mkdir -p $(DESTDIR)$(sysconfdir)/ceph
$(install_sh_SCRIPT) -m 0600 sample.ceph.conf $(DESTDIR)$(sysconfdir)/ceph/sample.ceph.conf
+ $(install_sh_SCRIPT) -m 0755 fetch_config $(DESTDIR)$(sysconfdir)/ceph/sample.fetch_config
mkdir -p $(DESTDIR)$(includedir)/ceph
$(install_sh_SCRIPT) -m 0644 client/libceph.h $(DESTDIR)$(includedir)/ceph/libceph.h
mkdir -p $(DESTDIR)$(includedir)/rados
crush/mapper.h\
crush/sample.txt\
crush/types.h\
+ fetch_config\
include/ClassLibrary.h\
include/Context.h\
include/CompatSet.h\
}
verify_conf() {
- # make sure ceph.conf exists
-
- if [ ! -e $conf ]; then
- if [ "$conf" = "$default_conf" ]; then
- echo "$0: ceph conf $conf not found; system is not configured."
- exit 0
+ # fetch conf?
+ if [ -x "$ETCDIR/fetch_config" ] && [ "$conf" = "$default_conf" ]; then
+ conf="/tmp/fetched.ceph.conf.$$"
+ echo "[$ETCDIR/fetch_config $conf]"
+ if $ETCDIR/fetch_config $conf && [ -e $conf ]; then true ; else
+ echo "$0: failed to fetch config with '$ETCDIR/fetch_config $conf'"
+ exit 1
+ fi
+ # yay!
+ else
+ # make sure ceph.conf exists
+ if [ ! -e $conf ]; then
+ if [ "$conf" = "$default_conf" ]; then
+ echo "$0: ceph conf $conf not found; system is not configured."
+ exit 0
+ fi
+ echo "$0: ceph conf $conf not found!"
+ usage_exit
fi
- echo "$0: ceph conf $conf not found!"
- usage_exit
fi
}
--- /dev/null
+#!/bin/sh
+conf="$1"
+
+## fetch ceph.conf from some remote location and save it to $conf.
+##
+## make sure this script is executable (chmod +x fetch_config)
+
+##
+## examples:
+##
+
+## from a locally accessible file
+# cp /path/to/ceph.conf $conf
+
+## from a URL:
+# wget -q -O $conf http://somewhere.com/some/ceph.conf
+
+## via scp
+# scp -i /path/to/id_dsa user@host:/path/to/ceph.conf $conf
+