ceph/do_cmake.sh
Sage Weil c8a06ce1ee do_cmake.sh: set .ceph_port to random port
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-03 18:40:07 -04:00

21 lines
402 B
Bash
Executable File

#!/bin/sh -x
git submodule update --init --recursive
if test -e build; then
echo 'build dir already exists; rm -rf build and re-run'
exit 1
fi
mkdir build
cd build
cmake $@ ..
# minimal config to find plugins
cat <<EOF > ceph.conf
plugin dir = lib
erasure code dir = lib
EOF
# give vstart a (hopefully) unique mon port to start with
echo $(( RANDOM % 1000 + 40000 )) > .ceph_port
echo done.