]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: pull default CEPH_PORT from .ceph_port 3458/head
authorSage Weil <sage@redhat.com>
Wed, 21 Jan 2015 21:03:57 +0000 (13:03 -0800)
committerSage Weil <sage@redhat.com>
Thu, 22 Jan 2015 19:06:23 +0000 (11:06 -0800)
This lets you put a unique port in .ceph_port in your working dir and
vstart.sh instances will avoid each other without having to pass
CEPH_PORT=... to each one each time.

Signed-off-by: Sage Weil <sage@redhat.com>
src/.gitignore
src/vstart.sh

index 531da972b227d9c23c420bf7237f01a017576db1..d714f13a72c144f6cb97bf50700a11e1bf9480ac 100644 (file)
@@ -82,3 +82,4 @@ Makefile
 # old dir, may in use by older branches
 /leveldb
 /mkcephfs
+/.ceph_port
index 469180d7a235d31422c691d38f6427379231e6a5..f766cf1179d52cd185a27cbfa354b04abdd52d5b 100755 (executable)
@@ -261,7 +261,10 @@ fi
 # export CEPH_ARGS="--lockdep 1"
 
 [ -z "$CEPH_BIN" ] && CEPH_BIN=.
-[ -z "$CEPH_PORT" ] && CEPH_PORT=6789
+if [ -z "$CEPH_PORT" ]; then
+    CEPH_PORT=6789
+    [ -e ".ceph.port" ] && CEPH_PORT=`cat .ceph_port`
+fi
 
 
 # sudo if btrfs
@@ -294,6 +297,7 @@ else
     echo ip $IP
 fi
 echo "ip $IP"
+echo "port $PORT"