]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart: --nodaemon to run via crun and -f (so that gprof works)
authorSage Weil <sage@newdream.net>
Tue, 28 Apr 2009 20:42:49 +0000 (13:42 -0700)
committerSage Weil <sage@newdream.net>
Tue, 28 Apr 2009 20:42:49 +0000 (13:42 -0700)
src/vstart.sh

index e12612acd6dd621473d1956ccd115f90401e2ae9..744e8b1f2fe3b9fe6b2c843efc8f68e5c1f9de98 100755 (executable)
@@ -11,6 +11,7 @@ start_mon=0
 start_mds=0
 start_osd=0
 localhost=0
+nodaemon=0
 MON_ADDR=""
 
 conf="ceph.conf"
@@ -58,6 +59,9 @@ case $1 in
            valgrind_mon=$2
            shift
            ;;
+    --nodaemon )
+           nodaemon=1
+           ;;
     mon | cmon )
            start_mon=1
            start_all=0
@@ -100,8 +104,13 @@ run() {
        valgrind --tool=$valg $* -f &
        sleep 1
     else
-       echo "$*"
-       $*
+       if [ "$nodaemon" -eq 0 ]; then
+           echo "$*"
+           $*
+       else
+           echo "crun $* -f &"
+           ./crun $* -f &
+       fi
     fi
 }