]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: look to ceph.conf instead of hard-coding /var/run/ceph
authorSage Weil <sage@inktank.com>
Sat, 8 Jun 2013 00:04:04 +0000 (17:04 -0700)
committerSage Weil <sage@inktank.com>
Thu, 13 Jun 2013 00:47:57 +0000 (17:47 -0700)
It could be elsewhere!

Signed-off-by: Sage Weil <sage@inktank.com>
src/init-ceph.in

index a7e026d23d0cf1807b7a2db229549af8641f824c..aea2dc376806f6f43e7212cd41414fc2d7529e37 100644 (file)
@@ -12,8 +12,6 @@
 # Description:       Enable Ceph distributed file system services.
 ### END INIT INFO
 
-RUN_DIR=/var/run/ceph
-
 # if we start up as ./mkcephfs, assume everything else is in the
 # current directory too.
 if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
@@ -181,7 +179,9 @@ for name in $what; do
     binary="$BINDIR/ceph-$type"
     cmd="$binary -i $id"
 
-    get_conf pid_file "$RUN_DIR/$type.$id.pid" "pid file"
+    get_conf run_dir "/var/run/ceph" "run dir"
+
+    get_conf pid_file "$run_dir/$type.$id.pid" "pid file"
 
     if [ "$command" = "start" ]; then
        if [ -n "$pid_file" ]; then
@@ -236,7 +236,7 @@ for name in $what; do
        lockfile=""
     fi
 
-    get_conf asok "$RUN_DIR/ceph-$type.$id.asok" "admin socket"
+    get_conf asok "$run_dir/ceph-$type.$id.asok" "admin socket"
 
     case "$command" in
        start)
@@ -327,7 +327,7 @@ for name in $what; do
            fi
 
            echo Starting Ceph $name on $host...
-           mkdir -p $RUN_DIR
+           mkdir -p $run_dir
            get_conf pre_start_eval "" "pre start eval"
            [ -n "$pre_start_eval" ] && $pre_start_eval
            get_conf pre_start "" "pre start command"